The office was created to replace the Governor of Hong Kong. The office, followed by the Hong Kong Basic Law, was created on 1 July 1997 when the sovereignty of Hong Kong was transferred from the United Kingdom to the People's Republic of China.