The handover of Macau from the Portuguese Republic to the People's Republic of China (PRC) officially occurred at midnight on 20 December 1999. This event ended 442 years of Portuguese rule in the former settlement, which began in 1557. Macau was settled by Portuguese merchants that year during the Ming dynasty era and was subsequently under various degrees of Portuguese rule until 1999. Portugal's involvement in the region was formally recognised by the Qing dynasty in 1749. The Portuguese governor João Maria Ferreira do Amaral, emboldened by British actions in the First Opium War and the Treaty of Nanking, attempted to annex the territory by expelling Qing authorities in 1846, but was assassinated in 1849. After the Second Opium War, the Portuguese government, along with a British representative, signed the 1887 Sino-Portuguese Treaty of Peking that gave Portugal perpetual colonial rights to Macau on the condition that Portugal would cooperate in efforts to end the smuggling of opium.
After the Proclamation of the People's Republic of China in 1949 and the transfer of China's seat from the Republic of China (ROC) to the PRC at the United Nations (UN) in 1971, then Chinese foreign Minister Huang Hua appealed to the UN Special Committee on Decolonization to remove Macau and Hong Kong from its list of colonies, preferring to engage in direct bilateral negotiations in getting the territories returned rather than the independence of the territories as was implied by its inclusion on the list.