Chapter 1: From Fangsheng to Open Urbanism: The Spatial Transformation of Song Dynasty Cities
To understand the extraordinary flourishing of Song Dynasty urban life, we must first grasp the radical spatial reordering that set its cities apart from every preceding era in Chinese history. For over five centuries, from the Northern Wei through the Tang Dynasty, Chinese imperial capitals had been built according to the rigid, codified principles of the *Kaogongji* (《考工记》, *Book of Artificers*), the ancient architectural manual that mandated a strict separation of residential and commercial space, a symmetrical grid layout, and a night curfew that locked city gates and ward gates at dusk. This system, known as *fangsheng* (坊市制, ward-market separation), organized Tang cities like Chang’an and Luoyang into a series of walled residential wards (*fang*, 坊) and designated market districts (*shi*, 市), with strict controls on when and where commerce could occur. For a child growing up in Tang Chang’an, the rhythm of urban life was dictated by the clang of ward gates closing at sunset: after the third watch (around 7 p.m. in summer), all residents were required to remain inside their wards, and street patrols would arrest anyone found outside without official permission. Markets operated only during daylight hours, and all commercial activity ceased the moment the market gates were locked for the night. Even wealthy merchant families could not conduct business after dark, and a child’s request to buy a sugar figurine from a night vendor would be met with a firm warning: “The patrols are out, and you will be taken to the county office if you leave the ward now.”
This rigid spatial order had served its purpose for centuries: it made it easier for the Tang state to collect taxes, monitor populations, and prevent rebellion in a period of political fragmentation. But by the 10th century, the system was becoming increasingly incompatible with the rapid growth of the commodity economy. The Tang Dynasty’s collapse in 907 CE was preceded by decades of peasant revolts, military rebellions, and economic disruption that had already eroded the state’s ability to enforce the *fangsheng* rules in many regions. When the Song Dynasty was founded in 960 CE, its rulers inherited a country where interregional trade was already far more developed than it had been in the early Tang, and where urban populations were growing far faster than the state’s administrative capacity to control them.
The first cracks in the *fangsheng* system appeared almost immediately after the Song took power. The Song founder, Emperor Taizu (r. 960–976 CE), initially attempted to revive the Tang-style ward-market system in his new capital, Kaifeng (then called Bianjing), which had been the capital of the Later Liang dynasty before the Song unification. Kaifeng was a natural choice for the Song capital: it sat at the northern end of the Grand Canal, the massive waterway that linked the rice-rich Yangtze River Delta to the political centers of northern China, making it the hub of all interregional trade in the country. But unlike Chang’an, which was built from scratch on a empty plain according to strict *Kaogongji* principles, Kaifeng had grown organically over centuries as a commercial hub, with no pre-existing grid of walled wards. When Taizu’s officials tried to impose the Tang-style ward system on Kaifeng, they found that the city’s residents simply refused to comply: merchants had already built shops along the city’s main streets and canals, and residents had already expanded their homes into the spaces between the planned ward boundaries. The state lacked the manpower to demolish thousands of existing buildings and force residents back into walled wards, so by the early 11th century, the Song court had quietly abandoned the attempt to enforce *fangsheng* in Kaifeng.
This abandonment was not just a practical concession to demographic and economic reality: it was also a deliberate policy choice driven by the Song state’s financial needs. Unlike the Tang Dynasty, which relied primarily on land taxes to fund its operations, the Song state derived more than 50% of its annual revenue from commercial taxes by the 11th century, a share that rose to nearly 70% during the Southern Song period. For Song rulers, encouraging commercial activity was not just a matter of economic policy: it was a matter of state survival. The Song faced constant military pressure from nomadic empires on its northern borders, and maintaining a large standing army and a complex bureaucracy required more revenue than land taxes alone could provide. By allowing merchants to open shops anywhere in the city, operate markets at all hours, and expand their businesses without restriction, the Song state could dramatically increase its commercial tax revenue. By the 1080s, the Song court had officially legalized the practice of *qinjie* (侵街, “street encroachment”), allowing merchants to set up stalls and shops on public streets in exchange for a small annual tax. The last remaining ward walls in Kaifeng were demolished in 1103 CE, during the reign of Emperor Huizong, marking the formal end of the *fangsheng* system in China’s capital.
To visualize the scale of this spatial transformation, compare the layout of Tang Chang’an and Northern Song Kaifeng using the diagram below. Chang’an was a perfect 9.7 kilometer square, divided into 108 identical rectangular wards, with two official market districts located in the exact center of the city’s north-south and east-west axes. All commerce was confined to these two markets, which were open only from dawn to dusk, and the entire city was surrounded by a 12-meter-high wall with gates that were locked at night. Kaifeng, by contrast, was a sprawling, irregularly shaped city of 30 square kilometers, three times the size of Chang’an, with no grid layout and no ward walls. Shops lined every major street and canal, markets operated 24 hours a day, and the city’s population reached an estimated 1.5 million people by the early 12th century, making it the largest city in the world at the time.
```mermaid graph TD A[Tang Dynasty City Layout<br/>Example: Chang’an] --> A1[Strict Symmetrical Grid<br/>9.7km square, 108 identical wards] A --> A2[Residential-Commercial Separation<br/>Wards for living only, 2 official markets for trade] A --> A3[Fixed Market Hours<br/>Markets open dawn to dusk only] A --> A4[Strict Night Curfew<br/>Ward and city gates locked at dusk, patrols arrest violators] B[Northern Song Kaifeng Layout] --> B1[Flexible Organic Layout<br/>30km², no grid, built along Grand Canal] B --> B2[Full Residential-Commercial Integration<br/>Shops line all streets/canals, mixed with residences] B --> B3[24/7 Commercial Activity<br/>Night markets, dawn markets, continuous trade] B --> B4[No Citywide Curfew<br/>Only imperial palace area restricted at night] style A fill:#f9f,stroke:#333,stroke-width:2px style B fill:#9f9,stroke:#333,stroke-width:2px ```
For a child living in Kaifeng, this transformation meant a complete revolution in daily life. A 10-year-old boy named Zhang Xiaoming, who lived in a small lane near the famous Fengyuan Tower in Kaifeng, could wake up early in the morning to buy a warm *chuobing* (steamed flatbread) from a vendor outside his lane, walk to his private school in a nearby ward, spend the afternoon browsing the stalls of the Daxiangguo Temple market after class, and spend the evening walking along the Bian River with his parents, eating lamb soup and watching puppet shows at a *wazi* (瓦子, entertainment quarter). He could even go out after dark to buy sugar figurines from night vendors, or watch late-night opera performances at the temple markets that stayed open until 3 a.m. For children like Zhang Xiaoming, the Song city was a place of endless possibility, where the boundaries between work, play, and home were far more flexible than they had ever been in the Tang Dynasty.
The same transformation took place in the Southern Song