Main articles: Prehistoric Hong Kong and History of Hong Kong under Imperial China
Archaeological studies support a human presence in the Chek Lap Kok area from 35,000 to 39,000 years ago, and in Sai Kung Peninsula from 6,000 years ago. Wong Tei Tung and Three Fathoms Cove are the two earliest sites of human habitation in the Paleolithic period. It is believed the Three Fathom Cove was a river valley settlement and Wong Tei Tung was a lithic manufacturing site. Excavated Neolithic artifacts suggest cultural differences from the Longshan culture in northern China and settlement by the Che people prior to the migration of the Baiyue. Eight petroglyphs were discovered on surrounding islands, which dated to the Shang Dynasty in China.
In 214 BC, Qin Shi Huang, the first emperor of China, conquered the Baiyue tribes in Jiaozhi (modern Liangguang region) and incorporated the territory into imperial China for the first time. Modern Hong Kong is located in Nanhai commandery (modern Nanhai District) and near the ancient capital city Panyu. The area was consolidated under the kingdom of Nanyue, founded by general Zhao Tuo in 204 BC after the Qin Dynasty collapsed. When the kingdom was conquered by Emperor Wu of Han in 111 BC, the land was assigned to the Jiaozhi commandery under the Han Dynasty. Archaeological evidence indicates the population increased and early salt production flourished in this time period. Lei Cheng Uk Han Tomb in the Kowloon Peninsula is believed to have been built during the Han Dynasty.
During the Tang Dynasty period, the Guangdong region flourished as a regional trading center. In 736, Emperor Xuanzong of Tang established a military town in Tuen Mun to defend the coastal area in the region. The first village school, Li Ying College, was established around 1075 in the New Territories under the Northern Song Dynasty. During the Mongol invasion in 1276, the Southern Song Dynasty court moved to Fujian, then