Parts of Macau were first loaned to the Portuguese by China as a trading centre in the 16th century, with the Portuguese required to administrate the city under Chinese authority. In 1851 and 1864, the Portuguese Empire occupied the two nearest offshore islands Taipa and Coloane respectively, and Macau officially became a colony of the Portuguese Empire in 1887. Macau was returned to China in 1999.