In 1887, the Chinese government was forced to sign the Sino-Portuguese Treaty of Peking which, among other concessions, recognised a permanent settlement of Macau by the Portuguese in exchange for Portugal agreeing to not cede the territory to another power without China's consent.