Due to the Malaccan Sultan lodging a complaint against the Portuguese invasion to the Chinese Emperor, the Portuguese were greeted with hostility from the Chinese when they arrived in China. The Sultan's complaint caused "a great deal of trouble" to Portuguese in China. The Chinese were very "unwelcoming" to the Portuguese. The Malaccan Sultan, based in Bintan after fleeing Malacca, sent a message to the Chinese, which combined with Portuguese banditry and violent activity in China, led the Chinese authorities to execute 23 Portuguese and torture the rest of them in jails. After the Portuguese set up posts for trading in China and committed piratical activities and raids in China, the Chinese responded with the complete extermination of the Portuguese in Ningbo and Quanzhou Pires, a Portuguese trade envoy, was among those who died in the Chinese dungeons.