Chinese records of Macau date back to the establishment in 1152 of Xiangshan County under which Macau was administered, though it remained unpopulated through most of the next century. Members of the South Sung (Song) Dynasty and some 50,000 followers were the first recorded inhabitants of the area, seeking refuge in Macau from invading Mongols in 1277. They were able to defend their
settlements and establish themselves there.
The Hoklo Boat people were the first to show commercial interest in Macau as a trading center for the southern provinces. Macau did not develop as a major settlement until the Portuguese arrived in the 16th century. Portuguese traders used Macau as a staging port as early as 1516, making it the oldest European settlement in the Far East. In 1557, the Chinese agreed to a Portuguese settlement
in Macau but did not recognize Portuguese sovereignty. Although a Portuguese municipal government was established, the sovereignty question remained unresolved.
Initially, the Portuguese developed Macau's port as a trading post for China-Japan trade and as a staging port on the long voyage from Lisbon to Nagasaki. When Chinese officials banned direct trade with Japan in 1547, Macau's Portuguese traders carried goods between the two countries. The first Portuguese governor was appointed to Macau in 1680, but the Chinese continued to assert their
authority, collecting land and customs taxes. Portugal continued to pay rent to China until 1849, when the Portuguese abolished the Chinese customs house and declared Macau's "independence," a year which also saw Chinese retaliation and finally the assassination of Gov. Ferreira do Amaral.
On March 26, 1887, the Manchu government acknowledged the Portuguese right of "perpetual occupation." The Manchu-Portuguese agreement, known as the Protocol of Lisbon, was signed with the condition that Portugal would never surrender Macau to a third party without China's permission.
Macau enjoyed a brief period of economic prosperity during World War II as the only neutral port in South China, after the Japanese occupied Guangzhou (Canton) and Hong Kong. In 1943, Japan created a virtual protectorate over Macau. Japanese domination ended in August 1945.
When the Chinese communists came to power in 1949, they declared the Protocol of Lisbon to be invalid as an "unequal treaty" imposed by foreigners on China. However, Beijing was not ready to settle the treaty question, requesting a maintenance of "the status quo" until a more appropriate time. Beijing took a similar position on treaties relating to the Hong Kong territories.
Riots broke out in 1966 when the procommunist Chinese elements and the Macau police clashed. The Portuguese Government reached an agreement with China to end the flow of refugees from China and to prohibit all communist demonstrations. This move ended the conflict, and relations between the government and the leftist organizations have remained peaceful.
The Portuguese tried once in 1966 after the riots in Macau, and again in 1974, the year of a military revolution in Portugal, to return Macau to Chinese sovereignty. China refused to reclaim Macau however, hoping to settle the question of Hong Kong first.
Portugal and China established diplomatic relations in 1979. A year later, Gen. Melo Egidio became the first Governor of Macau to visit China. The visit underscored both parties' interest in finding a mutually agreeable solution to Macau's status; negotiations began in 1985, a year after the signing of the Sino-U.K. agreement returning Hong Kong to China in 1997. The result was a 1987
agreement returning Macau to Chinese sovereignty as a Special Administrative Region (SAR) of China on December 20, 1999.