In 1276, during the Mongol invasion, the Southern Song dynasty court moved to Fujian, then to Lantau Island and later to today's Kowloon City.
Emperor Huaizong of Song, the last Song Dynasty emperor, was enthroned at Mui Wo on Lantau Island on at the age of eight.
Tung Chung valley, named after a hero who gave up his life for the emperor, is believed to have been one of the locations for his court.Hau Wong, an official of the emperor, is still worshipped in Hong Kong today. The five clans of Hau, Tang, Pang and Liu and Man were Chinese from Guangdong, Fujian and Jiangxi who lived mostly in the New Territories and eventually became Punti speakers.During the Ming dynasty, Hong Kong was administered by Xin'an County.During the Qing dynasty, Hong Kong remained under the governance of Xin'an County, before it was colonised by the British.As a military outpost and trading port, Hong Kong's territory gained the attention of the world.
After the Great Clearance policy, ordered by the Kangxi Emperor, many Hakka people migrated from inland China to Xin'an County, which included modern Hong Kong.Lantau Island was also a salt production centre, where riots by salt smugglers against the government broke out.From the middle of the Tang dynasty until the Ming dynasty, Hong Kong was governed by Dongguan County.Archaeological evidence indicates that the population increased during the Han dynasty (206 BC – AD 220).In the 1950s, the tomb at Lei Cheng Uk from the Eastern Han dynasty (25–220 AD) was excavated and archaeologists began to investigate the possibility that salt production flourished in Hong Kong around 2000 years ago, although conclusive evidence has not been found.Before the British government colonised the New Territories and New Kowloon in 1898, Punti, Hakka, Tanka and Hokkien people had migrated to and stayed in Hong Kong for many years. The Punti and Hokkien lived in the New Territories while the Tanka and Hakka lived both in the New Territories and Hong Kong Island.