It was only in 1887 that Macau formally, by treaty, came under Portuguese sovereignty, with the "Sino-Portuguese Treaty of Commerce and Friendship," which is more commonly called the "Sino-Portuguese Treaty of Peking." This important document was originally kept in the Imperial Zongli Yamen (which handled foreign affairs).
澳門正式葡屬的條約上是清光緒十三年（一八八七）的《中葡通商和好條約》（俗稱《中葡北京條約》），這個重要文獻原藏清總理事務衙門，中華民國成立後，又移轉至外交部。