Nanyue kingdom went on to become the strongest Baiyue state, with many neighbouring kingdoms declaring their allegiance to Nanyue rule. Zhao Tuo took the Han territory of Hunan and defeated the Han dynasty's first attack on Nanyue, later annexing the kingdom of Minyue in the east and conquering Âu Lạc, Northern Vietnam, in the west in 179 BC. The greatly expanded Nanyue kingdom included the territories of modern-day Guangdong, Guangxi and Northern Vietnam (Tonkin), with the capital situated at modern-day Guangzhou. The native peoples of Liangguang remained under Baiyue control until the Han dynasty in 111 BC, following the Han–Nanyue War. However, it was not until subsequent dynasties such as the Jin dynasty, the Tang dynasty and the Song dynasty that major waves of Han Chinese began to migrate south into Guangdong and Guangxi. Waves of migration and subsequent intermarriage meant that existing populations of both provinces were displaced, but some native groups like the Zhuangs still remained. The Cantonese often call themselves "people of Tang" (). This is because of the inter-mixture between native and Han immigrants in Guangdong and Guangxi reached a critical mass of acculturation during the Tang dynasty, creating a new local identity among the Liangguang peoples. During the 4th–12th centuries, Han Chinese people from the central plains migrated and settled in the South of China. This gave rise to peoples including the Cantonese themselves and other dialect groups of Guangdong during the Tang dynasty. There have been multiple migrations of Han people into Southeastern and Southern China throughout history. The origin of the Cantonese people is thus said to be Northern Chinese peoples that migrated to Guangdong and Guangxi while it was still inhabited by Baiyue peoples. During Wang Mang's reign in the Han dynasty (206BC–220AD), there were influxes of Han Chinese migrants into Guangdong and Guangxi, western coast of Hainan, Annam (now Northern Vietnam) and Eastern Yunnan. 19th–20th century: Turmoil and migration During the early 1800s, conflict occurred between Cantonese and Portuguese pirates in the form of the Ningpo massacre after the defeat of Portuguese pirates. The First (18391842) and Second Opium Wars (18561860) led to the loss of China's control over Hong Kong and Kowloon, which were ceded to the British Empire. Macau also became a Portuguese settlement. Between 1855 and 1867, the Punti–Hakka Clan Wars caused further discord in Guangdong and Guangxi. The third plague pandemic of 1855 broke out in Yunnan