The History of Hong Kong under Imperial China began in 214 BC during the Qin dynasty. The territory remained largely unoccupied until the later years of the Qing dynasty when Imperial China ceded the region to Great Britain under the 1842 Treaty of Nanking, whereupon Hong Kong became a British Colony.
Prior to the Qin dynasty, the area was populated by a large family of non-Chinese tribes known as the Yue people (Chinese: 越; Sidney Lau: Yuet6). Little is known for certain about the Yue people other than from information gleaned from ancient Chinese records and modern archaeological excavations. Their language is believed to have been Austroasiatic, although a clear consensus has yet to be reached on its more specific aspects.
Shortly after consolidating his rule over China in 221 BC, the First Emperor of the Qin dynasty sent a large army to conquer the Yue tribes and bring what is now southern China under Qin control. In 214 BC, Qin armies defeated the Yue tribes, and the area was annexed as Qin territory. The Qin dynasty organized its territory into "commanderies" (Chinese: 郡; pinyin: jùn; Sidney Lau: gwan6)- roughly equivalent to modern day provinces - and the territory of what is now Guangdong and Hong Kong became part of the Nanhai Commandery.