Actively recruited and encouraged foreigner traders to come to China by giving incentives like big farewell dinner out of government budget when their ships sail off. When the foreigner traders died in the sea, gave them compensation and when they have trouble, helped them with loans. And to fight the pirates, Song government set up patrolling in the sea off Guangzhou and Quanzhou etc ports.