Hànyīn
Hanyin's county town acquired its defensive walls in 1465, the first year of the Ming Chenghua reign. Built to follow the local terrain, the circuit had four gates, a watchtower and three defensive towers. Blue bricks faced the outside, while pebbles and a mixture of earth, lime and sand formed much of the inner structure.
The walls served against water as well as armed attack, combining defense with protection from flooding. Repairs continued through the Ming and Qing periods. In 1767 the magistrate Huang Daojia repaired the brick fortifications, whose foundations remain an important part of the surviving wall. The town's early modern construction history is therefore preserved in successive layers of earth, stone and brick, adapted both to military danger and to the conditions of a southern Shaanxi valley settlement.