The Hakka were originally immigrants from northern China who settled in the southern provinces. From the 17th century onwards, population pressures drove them more and more into conflict with their neighbours . As rivalry for resources turned to armed warfare, the Hakka began building communal living structures designed to be easily defensible. These houses, sometimes called ''tulou'', were often round in shape and internally divided into many compartments for food storage, living quarters, ancestral temple, armoury etc. The largest houses covered over 40,000 m² and it is not unusual to find surviving houses of over 10,000 m².
The materials used for Hakka architecture can either be brick, stone, or rammed earth, with the latter being most common.. The external wall is typically 1 metre in thickness and the entire building could be up to three or four stories in height. Often turrets were also built to extend the range of defensive power and to cover otherwise indefensible points. Battlements were also constructed on the top floor for muskets. The gate was the most vulnerable point and it was usually reinforced with stone and covered with iron. A number of smaller gates followed, in case the outer one was breached. With the exception of a few excessively large forts, Hakka houses usually only had one entrance. The round shape of the walls, which became popular in later stages, added to the defensive value of the fortifications and reduced the firepower of artillery against it. A Hakka fort could withstand a protracted siege, since it was well stocked with grains and had an internal source of water. They often also had their own sophisticated sewage systems.
The architectural style of Hakka forts is largely unique in China and around the world. The typical Chinese house contains a courtyard and other than pagodas, does not often contain any structures higher than two stories. The origins of Hakka architecture have been traced to older forms of fortifications in southern China, as seen in Han Dynasty and Three Kingdoms tomb models unearthed in Guangzhou, Guangdong and in Ezhou, Hubei.
The Hakkas who settled in mountainous south western Fujian province in China developed unique architectural buildings called ''tu lou'', literally meaning ''earthen structures''. Because of the undesirable mountainous regions, the Hakkas set up these unique homes to prevent attack from bandits and marauders. The ''tu lou'' are either round or square, and were designed as a large fortress and apartment building in one. Structures typically had only one entranceway and no windows at ground level. Each floor served a different function - the first hosts a well and livestock, the second is for food storage and the third and higher floors contain living spaces. ''Tu lou'' can be found mostly in south western Fujian and southern Jiangxi provinces.
buildings have been inscribed in 2008 by UNESCO as a World Heritage Site.
The largest communities of Hakkas worldwide, live mostly in eastern Guangdong, in particular the so-called Xing-Mei Area, whereas most the oversea descended Hakkas came from Huizhou. Unlike their kin in Fujian, the Hakkas in the Xingning（興寧，Hin Nin） and Meixian（梅縣，Moi Yen） area developed a non-fortress like unique architectural styles, most notably the weilongwu and sijiaolou .