In 1276 during the [[Mongol]] invasion, the [[Southern Song Dynasty]] court moved to [[Fujian]], then to Lantau Island and later to today's [[Sung Wong Toi|Kowloon City]]. [[Emperor Bing of Song|Emperor Huaizong of Song]], the last Song Dynasty emperor, was enthroned at [[Mui Wo]] on Lantau Island on 10 May 1278 at the age of 8. This event is commemorated by the [[Sung Wong Toi]] in Kowloon. After his defeat at the [[Battle of Yamen]] on 19 March 1279, the child emperor committed suicide by drowning with his officials at Mount Ya (modern [[Yamen (town)|Yamen Town]] in Guangdong). [[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.
During the Mongol period, Hong Kong saw its first population boom as Chinese refugees entered the area. The main reason for them to enter Hong Kong was because of [[wars]] and [[famines]], and some groups even went there to find jobs. Five [[Chinese clan|clans]] of (侯), [[Tang Clan|Tang]] (鄧), [[Peng (surname)|Pang]] (彭) and [[Liao (surname)|Liu]] (廖) and [[Wen (surname)|Man]] (文) lived mostly in the [[New Territories]] were [[Punti]] (Locals, 本地人) from [[Guangdong]], Fujian and [[Jiangxi]] in China. Despite the immigration and light development of agriculture, the area was hilly and relatively barren. People had to rely on salt, pearl and fishery trades to produce income. Some clans built [[...|walled villages]] to protect themselves from the threat of bandits, rival clans and wild animals. The famous Chinese [[pirate]] [[Cheung Po Tsai]] was legendary in Hong Kong.
The last dynasty in China, [[Qing Dynasty]], was also the last to come in contact with Hong Kong. As a military outpost and trading port, the Hong Kong territory later gained the attention of the world.