During the 19th century, the tension between the two groups (the Hakkas had by then been settled for several hundred years) led to a series skirmishes in the Pearl River Delta, known as the Punti–Hakka Clan Wars.
In an attempt to defeat Koxinga and his men without war, the Kangxi Emperor strengthened the sea ban (haijin) in 1661 and issued the order for the Great Clearance of the southeastern coast.
Han Chinese, especially the ethnic Tanka, who were living off the coast of Shandong to Guangdong were ordered to destroy their property and to move 30 to 50 li (about 16–31 km or 9.9–19.3 mi) inland upon pain of death to deprive the Taiwan-based anti-Qing loyalists of support or targets to raid.
As far fewer Punti returned to the abandoned lands than had been expected, the Qing ruler decided to provide incentives to repopulate these areas.
As the population of Guangdong soared, life became increasingly difficult, and unrest broke out, such as the Red Turban Rebellion, which was led by the Cantonese who attacked Ho Yun and Fat Shan.