The Sino-Portuguese Treaty of Peking was a trade treaty between the Kingdom of Portugal and the Qing dynasty of China, signed on 1 December 1887. It is counted by the Chinese as among the unequal treaties in the aftermath of the Second Opium War. The treaty gave Portugal perpetual colonial rights to Macau on the condition that Portugal would cooperate in efforts to end the smuggling of opium. Background On 13 August 1862, China and Portugal signed the Treaty of Friendship and Trade in Tientsin (Tianjin). The treaty was largely a trade agreement, but it also defined Macau's political and juridical status, although it did not directly mention the issue of Portuguese sovereignty. It contained two clauses regarding Macau's status: Article II annulled earlier agreements and referred to Macau as "formerly in the Province of Canton", while Article III recognised the status of a "Governor General of Macao". However, China did not ratify the treaty and it became void in 1864. In June 1886, a joint Sino-British commission advised that the administrative responsibility for controlling the import of opium into China should be transferred from the Hoppo in Canton (Guangzhou) to the Chinese Imperial Maritime Customs Service. Although Britain and China agreed to this, it could not be fully successful without Portuguese involvement. In 1887, China sent a diplomatic mission to Lisbon, which included James Campbell, a senior British member of the service, representing the superintendent of the customs service Sir Robert Hart. On 26 March 1887, Campbell and Portuguese Foreign Minister Henrique de Barros Gomes signed the four-point Lisbon Protocol: Art. 1st.—A Treaty of friendship and commerce with the most favoured nation clause will be concluded and signed at Peking. Art. 2nd.—China confirms perpetual occupation and government of Macao and its dependencies by Portugal, as any other Portuguese possession. Art. 3rd.—Portugal engages never to alienate Macao and its dependencies without agreement with China. Art. 4th.—Portugal engages to cooperate in opium revenue work at Macao in the same way as England at Hong Kong. Terms Portugal followed up on this agreement by sending an envoy to Peking (Beijing), where a treaty of amity and commerce based on the protocol was drawn up. On 1 December 1887, the Treaty of Peking was signed by Chinese representatives Prince Ch'ing and Sun Iu-uen, and Tomas de Sousa Rosa for Portugal on 1 December 1887. It contained 54 articles and was ratified on 28