Hong Kong was given by the Qing Dynasty to the British Empire in 1841 under the Treaty of Nanking. Kowloon was added to the area of Hong Kong in 1860 under the Convention of Peking, and New Territories was added in 1898 under the Second Convention of Peking. In 1941–1945, Hong Kong was ruled by the Japanese Empire during World War II. In 1984, People's Republic of China and the United Kingdom agreed under Sino-British Joint Declaration on the Question of Hong Kong that Hong Kong was to be returned to China on 1 July 1997.