Society of the Song Dynasty

Chinese society during the Song Dynasty (AD 960–1279) was marked by political and legal reforms, a philosophical revival of Confucianism, and the development of cities beyond administrative purposes into centers of trade, industry, and maritime commerce. The inhabitants of rural areas were mostly farmers, although some were also hunters, fishers, or government employees working in mines or the salt marshes. Conversely, shopkeepers, artisans, city guards, entertainers, laborers, and wealthy merchants lived in the county and provincial centers along with the Chinese gentry&mdash;a small, elite community of educated scholars and scholar-officials. As landholders and drafted government officials, the gentry considered themselves the leading members of society; gaining their cooperation and employment was essential for the county or provincial bureaucrat overburdened with official duties. In many ways, scholar-officials of the Song period differed from the more aristocratic scholar-officials of the Tang Dynasty (618–907). Civil service examinations became the primary means of appointment to an official post as competitors vying for official degrees dramatically increased. Frequent disagreements amongst ministers of state on ideological and policy issues led to political strife and the rise of political factions. This undermined the marriage strategies of the professional elite, which broke apart as a social group and gave way to a multitude of families which provided sons for civil service.

Confucian or Legalist scholars in ancient China—perhaps as far back as the late Zhou Dynasty (c. 1046–256 BC)—categorized all socio-economic groups into four broad and hierarchical occupations (in descending order): the shi (scholars, or gentry), the nong (peasant farmers), the gong (artisans and craftsmen), and the shang (merchants). Wealthy landholders and officials possessed the resources to better prepare their sons for the civil service examinations, yet they were often rivaled in their power and wealth by merchants of the Song period. Merchants frequently colluded commercially and politically with officials, despite the fact that scholar-officials looked down on mercantile vocations as less respectable pursuits than farming or craftsmanship. The military also provided a means for advancement in Song society for those who became officers, even though soldiers were not highly respected members of society. Although certain domestic and familial duties were expected of women in Song society, they nonetheless enjoyed a wide range of social and legal rights in an otherwise patriarchal society. Women's improved rights to property came gradually with the increasing value of dowries offered by brides' families.

Daoism and Buddhism were the dominant religions of China in the Song era, the latter deeply impacting many beliefs and principles of Neo-Confucianism throughout the dynasty. Ironically, Buddhism came under heavy criticism by staunch Confucian advocates and philosophers of the time. Older beliefs in ancient Chinese mythology, folk religion, and ancestor worship also played a large part in people's daily lives, as the Chinese believed that deities and ghosts of the spiritual realm frequently interacted with the living realm.

The Song justice system was maintained by policing sheriffs, investigators, official coroners, and exam-drafted officials who acted as magistrates. Song magistrates were encouraged to apply both their practical knowledge as well as the written law in making judicial decisions that would promote societal morality. Advancements in early forensic science, a greater emphasis on gathering credible evidence, and careful recording by clerks of autopsy reports and witness testimonies aided authorities in convicting criminals.

Urban growth and management
Chinese cities of the Song period became some of the largest in the world, owing to technological advances and an agricultural revolution. With a thriving shipbuilding industry and new mining facilities, Fujian became the economic powerhouse of China during the Song period. The great seaport of China, Quanzhou, was located in Fujian, and by 1120 its governor claimed that the city's population had reached some 500,000. The inland Fujianese city of Jiankang was also very large at this time, with a population of about 200,000. Robert Hartwell states that from 742 to 1200 the population growth of North China increased by only 54% percent in comparison to the Southeast which grew by 695%, the middle Yangzi Valley by 483%, the Lingnan region by 150%, and the upper Yangzi Valley by 135%. From the 8th to 11th centuries the lower Yangzi Valley experienced modest population growth in comparison to other regions of South China. The shift of the capital to Hangzhou did not create an immediate dramatic change in population growth until the period from 1170 to 1225, when new polders allowed land reclamation for nearly all the arable land between Lake Tai and the East China Sea as well as the mouth of the Yangzi to the northern Zhejiang coast.

China's newly commercialized society was evident in the differences between its northern capital and the earlier Tang capital at Chang'an. A center of great wealth, Chang'an's importance as the political center eclipsed its importance as a commercial entrepôt; Yangzhou was the economic hub of China during the Tang period. On the other hand, Kaifeng's role as a commercial center in China was as important as its political role. After the curfew was abolished in 1063, marketplaces in Kaifeng were open every hour of the day, whereas a strict curfew was imposed upon the two official marketplaces of Tang era Chang'an starting at dusk; this curfew limited its commercial potential. Shopkeepers and peddlers in Kaifeng began selling their goods at dawn. Along the wide avenue of the Imperial Way, breakfast delicacies were sold in shops and stalls and peddlers offered hot water for washing the face at the entrances of bathhouses. Lively activity in the markets did not begin to wane until about the evening meal of the day, while noodle shops remained open all day and night. People in the Song era were also more eager to purchase houses located near bustling markets than in earlier periods. Kaifeng's wealthy, multi-story houses and common urban dwellings were situated along the streets of the city, rather than hidden inside walled compounds and gated wards as they had been in the earlier Tang capital.

The municipal government of Hangzhou enacted policies and programs that aided in the maintenance of the city and ensured the well-being of its inhabitants. In order to maintain order in such a large city, four or five guards were quartered in the city at intervals of about 300 yd. Their main duties were to prevent brawls and thievery, patrol the streets at night, and quickly warn the public when fires broke out. The government assigned 2,000 soldiers to 14 fire stations built to combat the spread of fire within the city, and stationed 1,200 soldiers in fire stations outside the city's ramparts. These stations were placed 500 yd apart, with watchtowers that were permanently manned by 100 men each. Like earlier cities, the Song capitals featured wide, open avenues to create fire breaks. However, widespread fires remained a constant threat. When a fire broke out in 1137, the government suspended the requirement of rent payments, alms of 108,840 kg (120 tons) of rice were distributed to the poor, and items such as bamboo, planks, and rush-matting were exempt from government taxation. Fires were not the only problem facing the residents of Hangzhou and other crowded cities. Far more than in the rural countryside, poverty was widespread and became a major topic of debate at the central court and in local governments. To mitigate its effects, the Song government enacted many initiatives, including the distribution of alms to the poor; the establishment of public clinics, pharmacies, and retirement homes; and the creation of paupers' graveyards. In fact, each administrative prefecture had public hospitals managed by the state, where the poor, aged, sick, and incurable could be cared for, free of charge.

In order to maintain swift communication from one town or city to another, the Song laid out many miles of roadways and hundreds of bridges throughout rural China. They also maintained an efficient postal service nicknamed the hot-foot relay, which featured thousands of postal officers managed by the central government. Postal clerks kept records of dispatches, and postal stations maintained a staff of cantonal officers who guarded mail delivery routes. After the Song period, the Yuan Dynasty transformed the postal system into a more militarized organization, with couriers managed under controllers. This system persisted from the 14th century until the 19th century, when the telegraph and modern road-building were introduced to China from the West.

Amusements and pastimes
A wide variety of social clubs for affluent Chinese became popular during the Song period. A text dated 1235 mentions that in Hangzhou City alone there was the West Lake Poetry Club, the Buddhist Tea Society, the Physical Fitness Club, the Anglers' Club, the Occult Club, the Young Girls' Chorus, the Exotic Foods Club, the Plants and Fruits Club, the Antique Collectors' Club, the Horse-Lovers' Club, and the Refined Music Society. No formal event or festival was complete without banquets, which necessitated catering companies.

The entertainment quarters of Kaifeng, Hangzhou, and other cities featured amusements including snake charmers, sword swallowers, fortunetellers, acrobats, puppeteers, actors, storytellers, tea houses and restaurants, and brokers offering young women who could serve as hired maids, concubines, singing girls, or prostitutes. These entertainment quarters, covered bazaars known as pleasure grounds, were places where strict social morals and formalities could be largely ignored. The pleasure grounds were located within the city, outside the ramparts near the gates, and in the suburbs; each was regulated by a state-appointed official. Games and entertainments were an all-day affair, while the taverns and singing girl houses were open until two o'clock in the morning. While being served by waiters and ladies who heated up wine for parties, drinking playboys in winehouses would often be approached by common folk called "idlers" (xianhan) who offered to run errands, fetch and send money, and summon singing girls.

Dramatic performances, often accompanied by music, were popular in the markets. The actors were distinguished in rank by type and color of clothing, honing their acting skills at drama schools. Satirical sketches denouncing corrupt government officials were especially popular. Actors on stage always spoke their lines in Classical Chinese; vernacular Chinese that imitated the common spoken language was not introduced into theatrical performances until the subsequent Yuan Dynasty. Although trained to speak in the erudite Classical language, acting troupes commonly drew their membership from one of the lowest social groups in society: prostitutes. Of the fifty some theatres located in the pleasure grounds of Kaifeng, four of these theatres were large enough to entertain audiences of several thousand each, drawing huge crowds which nearby businesses thrived upon.

There were also many vibrant public festivities held in cities and rural communities. Martial arts were a source of public entertainment; the Chinese held fighting matches on lei tai, a raised platform without rails. With the rise in popularity of distinctive urban and domestic activities during the Song Dynasty, there was a decline in traditional outdoor Chinese pastimes such as hunting, horseback riding, and polo. In terms of domestic leisure, the Chinese enjoyed a host of different activities, including board games such as xiangqi and go. There were lavish garden spaces designated for those wishing to stroll, and people often took their boats out on the lake to entertain guests or to stage boat races.

Rural life
In many ways, life for peasants in the countryside during the Song Dynasty was similar to those living in previous dynasties. The people spent their days ploughing and planting in the fields, tending to their families, selling crops and goods at local markets, visiting local temples, and arranging ceremonies such as marriages. Cases of banditry, which local officials were forced to combat, occurred constantly in the countryside.

There were varying types of land ownership and tenure depending on the topography and climate of one's locality. In hilly, peripheral areas far from trade routes, most peasant farmers owned and cultivated their own fields. In frontier regions such as Hunan and Sichuan, owners of wealthy estates gathered serfs to till their lands. The most advanced areas had few estates with serfs tilling the fields; these regions had long fostered wet-rice cultivation, which did not require centralized management of farming. Landlords set fixed rents for tenant farmers in these regions, while independent small farming families also owned their own lots.

The Song government provided tax incentives to farmers who tilled lands along the edges of lakes, marshes, seas, and terraced mountain slopes. Farming was made possible in these difficult terrains due to improvements in damming techniques and using chain pumps to elevate water to higher irrigation planes. The 10th century introduction of early-ripening rice that could grow in varied climatic zones and topographic conditions allowed for a significantly large migration from the most productive lands that had been farmed for centuries into previously uninhabited areas in the surrounding hinterland of the Yangzi Valley and Southeast China, which experienced rapid development. The widespread cultivation of rice in China necessitated new trends of labor and agricultural techniques. An effective yield from rice paddies required careful transplanting of rows of rice seedlings, sufficient weeding, maintenance of water levels, and draining of fields for harvest. Planting and weeding often required a dirty day of work, since the farmers had to wade through the muddy water of the rice paddies on bare feet. For other crops, water buffalos were used as draft animals for ploughing and harrowing the fields, while properly aged and mixed compost and manure was constantly spread.

Social class
One of the fundamental changes in Chinese society from the Tang Dynasty to the Song Dynasty was the transformation of the scholarly elite, which included the scholar-officials and all those who held examination degrees or were candidates of the civil service examinations. The Song scholar-officials and examination candidates were better educated, less aristocratic in their habits, and more numerous than in the Tang period. Following the logic of the Confucian philosophical classics, Song scholar-officials viewed themselves as highly moralistic figures whose responsibility was to keep greedy merchants and power-hungry military men in their place. Even if a degree-holding scholar was never appointed to an official government post, he nonetheless felt himself responsible for upholding morality in society, and became an elite member of his community.

Arguably the most influential factor shaping this new class was the competitive nature of scholarly candidates entering civil service through the imperial examinations. Although not all scholar-officials came from the landholding class, sons of prominent landholders had better access to higher education, and thus greater ability to pass examinations for government service. Gaining a scholarly degree by passing prefectural, circuit-level, or palace exams in the Song period was the most important prerequisite in being considered for appointment, especially to higher posts; this was a departure from the Tang period, when the examination system was enacted on a much smaller scale. A higher degree attained through the three levels of examinations meant a greater chance of obtaining higher offices in government. Not only did this ensure a higher salary, but also greater social prestige, visibly distinguished by dress. This institutionalized distinction of scholar-officials by dress included the type and even color of traditional silken robes, hats, and girdles, demarcating that scholar-official's level of administrative authority. This rigid code of dress was especially enforced during the beginning of the dynasty, although the prestigious clothing color of purple slowly began to diffuse through the ranks of middle and low grade officials.

Scholar-officials and gentry also distinguished themselves through their intellectual pursuits. While some such as Shen Kuo (1031–1095) and Su Song (1020–1101) dabbled in every known field of science, study, and statecraft, Song elites were generally most interested in the leisurely pursuits of composing and reciting poetry, art collecting, and antiquarianism. Yet even this pursuit could turn into a scholarly one. It was the official, historian, poet, and essayist Ouyang Xiu (1007–1072) who compiled an analytical catalogue of ancient rubbings on stone and bronze which pioneered ideas in early epigraphy and archeology. Shen Kuo even took an interdisciplinary approach to archeological study, in order to aid his work in astronomy, mathematics, and recording ancient musical measures. The scholar-official and historian Zeng Gong (1019–1083) reclaimed last chapters of the ancient Zhan Guo Ce, proofreading and editing the version that would become the accepted modern version. The ideal official and gentry scholars were also expected to employ these intellectual pursuits for the good of the community, such as writing local histories or gazetteers. In the case of Shen Kuo and Su Song, their pursuits in academic fields such as classifying pharmaceuticals and improving calendrical science through court work in astronomy fit this ideal.

Along with intellectual pursuits, the gentry exhibited habits and cultured hobbies which marked their social status and refinement. The erudite term of enjoying the company of the 'nine guests' (jiuke)—an extension of the Four Arts of the Chinese Scholar—was a metaphor for accepted gentry pastimes of playing the Chinese zither, playing Chinese chess, Zen Buddhist meditation, ink (calligraphy and painting), tea drinking, alchemy, chanting poetry, conversation, and drinking wine. The painted artwork of the gentry shifted dramatically in style from Northern to Southern Song, due to underlying political, demographic, and social circumstance. Northern Song gentry and officials, who were concerned largely with tackling issues of national interest and not much for local affairs, preferred painting huge landscape scenes where any individuals were but tiny figures immersed within a larger context. During the Southern Song, political, familial, and social concerns became heavily embedded with localized interests; these changes correlate with the chief style of Southern Song paintings, where small, intimate scenes with a primary focus on individuals was emphasized.

The wealthy families living on the estates of these scholar-officials – as well as rich merchants, princes, and nobles—often maintained a massive entourage of employed servants, technical staffs, and personal favorites. They hired personal artisans such as jewellers, sculptors, and embroiderers, while servants cleaned house, shopped for goods, attended to kitchen duties, and prepared furnishings for banquets, weddings, and funerals. Rich families also hosted literary men such as secretaries, copyists, and hired tutors to educate their sons. They were also the patrons of musicians, painters, poets, chess players, and storytellers.

The historian Jacques Gernet stresses that these servants and favorites hosted by rich families represented the more fortunate members of the lower class. Other laborers and workers such as water-carriers, navvies, peddlers, physiognomists, and soothsayers "lived for the most part from hand to mouth." The entertainment business in the covered bazaars in the marketplace and at the entrances of bridges also provided a lowly means of occupation for storytellers, puppeteers, jugglers, acrobats, tightrope walkers, exhibitors of wild animals, and old soldiers who flaunted their strength by lifting heavy beams, iron weights, and stones for show. These people found the best and most competitive work during annual festivals. In contrast, the rural poor consisted mostly of peasant farmers. However, some in rural areas chose vocations centered chiefly around hunting, fishing, forestry, and state-offered occupations such as mining or working in the salt marshes.

According to their Confucian ethics, elite and cultured scholar-officials viewed themselves as the pinnacle members of society (second only to the imperial family). Rural farmers were seen as the essential pillars that provided food for all of society; they were given more respect than the local or regional merchant, no matter how rich and powerful. The Confucian-taught scholar-official elite who ran China's vast bureaucracy viewed their society's growing interest in commercialism as a sign of moral decay. Nonetheless, Song Chinese urban society was teeming with wholesalers, shippers, storage keepers, brokers, traveling salesmen, retail shopkeepers, peddlers, and many other lowly commercial-based vocations.

Despite the scholar-officials' suspicion and disdain for powerful merchants, the latter often colluded with the scholarly elite. The scholar-officials themselves often became involved in mercantile affairs, blurring the lines of who did and did not belong to the merchant class. Even rural farmers engaged in the small-scale production of wine, charcoal, paper, textiles, and other goods. Theoretically it was forbidden for an official to partake in private affairs of gaining capital while serving and receiving a salary from the state. In order to avoid ruining one's reputation as a moral Confucian, scholar-officials had to work through business intermediaries; as early as 955 a written decree revealed the use of intermediary agents for private business transactions with foreign countries. Since the Song government took over several key industries and imposed strict state monopolies, the government itself acted as a large commercial enterprise run by scholar-officials. The state also had to contend with the merchant and artisan guilds; whenever the state requisitioned goods and assessed taxes it dealt with guild heads, who ensured fair prices and fair wages via official intermediaries. Yet joining a guild was an immediate means to neither empowerment nor independence; historian Jacques Gernet states: "[the guilds] were too numerous and too varied to allow their influence to be felt."

From the scholar-official's view, the artisans and craftsmen were essential workers in society on a tier just below the farming peasants, and different from the merchants and traders who were considered parasitic. It was craftsmen and artisans who fashioned and manufactured all of the goods needed in Song society, such as standard-sized waterwheels and chain pumps made by skilled wheelwrights. Although architects and carpenter builders were not as highly venerated as the scholar-officials, there were some architectural engineers and authors who gained wide acclaim at court and in the public sphere for their achievements. This included the official Li Jie (1065–1110), a scholar who was eventually promoted to high positions in government agencies of building and engineering. His written manual on building codes and procedures was sponsored by Emperor Huizong (r. 1100–1126) for these government agencies to employ and was widely printed for the benefit of literate craftsmen and artisans nationwide. The technical written work of the earlier 10th-century architect Yu Hao was also given a great amount of praise by the polymath scholar-official Shen Kuo in his Dream Pool Essays of 1088.

Due to previous episodes of court eunuchs amassing power, they were looked upon with suspicion by scholar-officials and Confucian literati. Still, their association with inner palace life and their frequent appointments to high levels of military command provided them with significant prestige. Although military officers with successful careers could gain a considerable amount of prestige, the soldier in Song society was looked upon with a bit of disdain by scholar-officials and cultured people. This is best reflected in a Chinese proverb: "Good iron isn't used for nails; good men aren't used as soldiers." This attitude had several roots. Many people who enrolled themselves as soldiers in the armed forces were rural peasants in debt, many of them former workers of the salt trade who could not pay back their loans and had been reduced to flight. However, the prevailing attitude of gentry towards military servicemen stemmed largely from the knowledge of historical precedent, as military leaders in the late Tang Dynasty and the Five Dynasties and Ten Kingdoms (907–960) period amassed more power than the civil officials, in some respects replacing them and the civilian government altogether. Song emperors expanded the civil service examination system and government school system in order to avoid the earlier scenario of domination by military strongmen over the civil order.

Government schools versus private academies
The first nationwide government-funded school system in China was established in the year 3 AD under Emperor Ping of Han (9 BC–5 AD). During the Northern Song Dynasty, the government gradually reestablished an official school system after it was heavily damaged during the preceding Five Dynasties period. Government-established schools soon eclipsed the role of private academies by the mid-11th century. At the apex of higher education in the school system were the central schools located in the capital city, the Guozijian, the Taixue, and several vocational schools. The first major reform effort to rebuild prefectural and county schools was initiated by Chancellor Fan Zhongyan (989–1052) in the 1040s. Before this time, the bulk of funds allotted for the establishment of prefectural and county schools was left up to private financing and minimal amount of government funding; Fan's reform effort started the trend of greater government financing, at least for prefectural schools. Major expansion of educational facilities was initiated by Emperor Huizong, who used funds originally allotted for disaster relief and food-price stabilizing to fund new prefectural and county schools and demoted officials who neglected to repair, rebuild, and maintain these government schools. The historian John W. Chaffe states that by the early 12th century the state school system had 1500000 acre of land that could provide for some 200,000 student residents living in dormitories. After the widespread destruction of schools during the Jurchen invasions from the 1120s to 1140s, Emperor Gaozong of Song (r. 1127–1162) issued an edict to restore prefectural schools in 1142 and county schools in 1148, although the county schools by and large were reconstructed by the efforts of local county officials' private fundraising.

By the late 12th century, many critics of the examination system and government-run schools initiated a movement to revive private academies. During the course of the Southern Song, the academy became a viable alternative to the state school system. Even those that were semi-private or state-sponsored were still seen as independent of the state's influence and their teachers uninterested in larger, nationwide issues. One of the earliest academic institutions established in the Song period was the Yuelu Academy, founded in 976 during the reign of Emperor Taizu (r. 960–976). The Chinese scientist and statesman Shen Kuo was once the head chancellor of the Hanlin Academy, established during the Tang Dynasty. The Neo-Confucian Donglin Academy, established in 1111, was founded upon the staunch teaching that adulterant influences of other ideologies such as Buddhism should not influence the teaching of their purely Confucian school. This belief hearkened back to the writings of the Tang Dynasty essayist, prose stylist, and poet Han Yu (768–824), who was certainly a critic of Buddhism and its influence upon Confucian values. Although the White Deer Grotto Academy of the Southern Tang (937–976) had fallen out of use during the early half of the Song, the Neo-Confucian philosopher Zhu Xi (1130–1200) reinvigorated it.

Zhu Xi was one of many critics who argued that government schools did not sufficiently encourage personal cultivation of the self and molded students into officials who cared only for profit and salary. Not all social and political philosophers in the Song period blamed the examination system as the root of the problem (but merely as a method of recruitment and selection), emphasizing instead the gentry's failure to take responsibility in society as the cultural elite. Zhu Xi also laid emphasis on the Four Books, a series of Confucian classics that would become the official introduction of education for all Confucian students, yet were initially discarded by his contemporaries. After his death, his commentary on the Four Books found appeal amongst scholar-officials and in 1241 his writings were adopted as mandatory readings for examination candidates with the support of Emperor Lizong (r. 1224–1264).

Examinations and elite families
The number of applicants for the Imperial examinations far outmatched the actual number of jinshi, or "presented scholars" who were given official appointments in the Song Dynasty. Five times more jinshi were accepted in the Song period than during the Tang, yet the larger number of degree holders did not lower the prestige of the degree. Rather, it encouraged more to enter and compete in the exams, which were held every three years. Roughly 30,000 men took the prefectural exams in the early 11th century, increasing to nearly 80,000 around 1100, and finally to an astonishing 400,000 exam takers by the 13th century. With these odds, the chances of an applicant passing the examination and becoming a graduate was 1 in 333. Once a degree was obtained, however, this did not ensure an immediate path to office. The total number of scholar-officials in the Tang was about 18,000, while the total number in the Song had only increased to about 20,000. With China's growing population and an almost stagnant number of officials accepted into government, the degree holders who were not appointed to office fulfilled an important role on the grassroots level of society. They became the local elite of their communities, while scholar-officials relied upon them for maintaining order and fulfilling various duties under their jurisdiction.

An atmosphere of intellectual competition existed between aspiring Confucian scholars. Wealthy families were eager to gather stacks of published books for their personal libraries, collecting books that covered the Confucian classics as well as philosophical works, mathematical treatises, pharmaceutical documents, Buddhist sutras, and other literature aimed at the gentry class. The advancement of widespread book manufacturing through woodblock printing and then movable type printing by the 11th century aided in the expansion of the number of educated candidates for the civil service exams. These developments also reduced the overall cost of books so that they became more accessible to those of lesser means.

Song scholar-officials were granted ranks, honors, and career appointments on the basis of merit, the standards of which were codified and more objective than those in the Tang Dynasty. The anonymity of exam candidates guarded against fraud and favoritism by those who could judge papers based upon handwriting and/or signature calligraphy; a bureau of copyists was tasked with the job of recopying all the candidates' papers before grading. After passing the prefectural, provincial, and then palace exam (the most prestigious), scholarly degrees did not immediately ensure an appointment to office, but the more prestigious the degree, the more certain one's career in higher administrative posts would be. The central government held the exclusive right to appoint or remove officials. The case for removal was always carefully examined, since the central government kept a recorded dossier of reports on each official, stored in the capital for later review.

Ebrey states that meritocracy and a greater sense of social mobility were also prevalent in the civil service examination system, as the government held a list of all examination graduates, showing that only roughly half of those who passed had a father, or grandfather, or great-grandfather who served as a government official. However, Robert Hartwell and Robert P. Hymes state that this fact, first presented by Edward A. Kracke in 1947 and supported by Sudō Yoshiyuki and Ho Ping-ti, emphasizes the role of the nuclear family and only demonstrates three paternal ascendants of the candidates while ignoring the demographic reality of Song China, the significant proportion of males in each generation that had no surviving sons, and the role of the extended family. Male children with fathers who were incumbents in office had the advantage of early education and experience, as they were often appointed by their father to low-level staff positions. Yet with the so-called 'protection' (yin) privilege this arrangement was extended to close relatives, as an elder brother, uncle, father-in-law, and even father-in-law to one's uncle could help one secure a future in office. The Song era poet Su Shi (1037–1101) wrote a poem called On the Birth of My Son, poking fun at the situation of children from affluent and politically connected backgrounds having the upper edge over bright children of lower status:

Robert Hartwell notes that in the Northern Song Dynasty there were two types of elites who dominated the civil service: a founding elite and a professional elite. The founding elite consisted of the North China military governors of the 10th century, their associates, personal staffs, and bureaucrats who had served in the capitals of the administrations of the previous Five Dynasties. The professional bureaucracy consisted of elite families who had established residence in Kaifeng or subordinate capitals, claimed prestigious clan ancestry, had intermarried with other prominent families, had members in higher offices over generations, and periodically dominated Song government until the 12th century. The prominent families of this professional elite accounted for 18 of the 11th century chancellors, the highest official post. From 960 to 986, the founding military elite from Shanxi, Shaanxi, and Hebei represented 46% of fiscal offices, people from districts in Songzhou—the military governorship of the founding emperor—represented 22% of fiscal offices, and those from Kaifeng and Luoyang filled 13% of fiscal posts. In the same period, the founding elite and professional elite filled over 90% of policy-making positions. However, after 983, when the south had been conquered and consolidated into the empire, a semi-hereditary professional elite gradually replaced the founding elite. After 1086 not a single family of the founding elite had a member in either policy-making or financial positions. Between 998 and 1085, the 35 most important families of the professional elite represented only 5% of the families that had members in policy-making offices, yet they disproportionately held 23% of these positions. By the late 11th century the professional elite began to break apart as a distinguishable status group aiming for civil service. They were replaced by a multitude of local gentry lineages who had their children pursue a slew of different professions other than official careers. Hartwell states that this shift of power was the result of the professional elite's lineage strategies being undermined by the rise of factional partisan politics in the latter half of the 11th century.

Before the 1080s, the majority of officials drafted came from a regionally diverse background; afterwards, intraregional patterns of drafting officials became more common. Hartwell writes that during the Southern Song, the shift of power from central to regional administrations, the localized interests of the new gentry, the enforcement of prefectural quotas in preliminary examinations, and the uncertainties of a successful political career in the factionally split capital led many civil servants to choose positions that would allow them to remain in specific regions. Hymes demonstrates how this correlated with the decline in long-distance marriage alliances that had perpetuated the professional elite in the Northern Song, as the Southern Song gentry preferred local marriage prospects. It was not until the reign of Emperor Shenzong (r. 1068–1085) that the now heavily populated regions of South China began providing a quantity of officials in policy-making posts that were proportionate to their share of China's total population. From 1125 to 1205, about 80% of all those who held office in one of the six ministries of the central government had spent most of their low-grade official careers within the area of modern southern Anhui, southern Jiangsu, Zhejiang, and Fujian provinces. Almost 100% of these officials were born and buried within this southeastern macroregion.

Administrative units
Within the largest political divisions of the Song known as circuits (lu) there were a number of prefectures (zhou), which in turn were divided into the smallest political units of counties (xian); there were about 1,230 counties during the Song period. The prefect during the early Northern Song was the prime official of local government authority, who was the lowest regional official allowed to memorialize the throne, was primary tax collector, and head magistrate over several magistrates within his jurisdiction that dealt with civil disputes and maintaining order. By the late Northern Song, the growth in the number of counties with different proportions in population under a prefect's jurisdiction decreased the importance of the latter office, as it became more difficult for the prefect to manage the counties. This was part of a larger continuum of administrative trends from the Tang to Ming dynasties, with the gradual decline of importance of intermediate administrative units—the prefectures—alongside a shift of power from central government to large regional administrations; the latter experienced progressively less influence of central government in their routine affairs. In the Southern Song, four semi-autonomous regional command systems were established based on territorial and military units; this influenced the model of detached service secretariats which became the provincial administrations (sheng) of the Yuan (1279–1368), Ming (1368–1644), and Qing (1644–1912) dynasties. The administrative control of the Southern Song central government over the empire became increasingly limited to the circuits located in closer proximity to the capital at Hangzhou, while those farther away practiced greater autonomy.

Official careers
After the tumultuous An Lushan Rebellion (755–763), the early Tang career path of officials rising in a hierarchy of six ministries—with Works given the lowest status and Personnel the highest—was changed into a system where officials chose specialized careers within one of the six ministries. The commissions of Salt and Iron, Funds, and Census that were created to deal with immediate financial crisis after An Lushan's insurrection were the influential basis for this change in career paths that became focused within functionally distinct hierarchies. The varied career backgrounds and expertise of early Northern Song officials meant that they were to be given specific assignment to work in only one of the ministries: Personnel, Revenue, Rites, War, Justice, or Works. As China's population increased and regional economies became more complex the central government could no longer handle the separate parts of the empire efficiently. As a result of this, in 1082 the reorganization of the central bureaucracy scrapped the hierarchies of commissions in favor of the early Tang model of officials advancing through a hierarchy of ministries, each with different levels of prestige.

In observing a multitude of biographies and funerary inscriptions, Hymes states that officials in the Northern Song era displayed a primary preoccupation with national interests, as they did not intervene in local or central government affairs for the benefit of their local prefecture or county. This trend was reversed in the Southern Song. Since the majority of central government officials in the Southern Song came from the macroregion of Anhui, Jiangsu, Zhejiang, and Fujian, Hartwell and Hymes state that there was a great amount of ad hoc local interests represented in central government policies.

Lower-grade officials on the county and prefectural levels performed the necessary duties of administration such as collecting taxes, overseeing criminal cases, implementing efforts to fight famine and natural calamity, and occasionally supervising market affairs or public works. Since the incredible growth of China's population far outmatched the total number of officials accepted as administrators in the Song government, educated gentry who had not been appointed to an official post were entrusted as supervisors of affairs in rural communities. It was the "upper gentry" of high-grade officials in the capital—comprising mostly those who passed the palace exams—who were in a position to influence and reform society.

Political partisanship and reform
The high echelons of the political scene during the Song Dynasty left a notorious legacy of partisanship and strife among factions of state ministers. The careers of low-grade and middle-grade officials were largely secure; in the high ranks of the central administration, "reverses of fortune were to be feared," as Sinologist historian Jacques Gernet put it. The Chancellor Fan Zhongyan (989–1052) introduced a series of reforms between 1043 and 1045 that received heated backlash from the conservative element at court. Fan set out to erase corruption from the recruitment system by providing higher salaries for minor officials, in order to persuade them not to become corrupt and take bribes. He also established sponsorship programs that would ensure officials were drafted on their merits, administrative skills, and moral character more than their etiquette and cultured appearance. However, the conservatives at court did not want their career paths and comfortable positions jeopardized by new standards, so they rallied to successfully halt the reforms.

Inspired by Fan, the later Chancellor Wang Anshi (1021–1086) implemented a series of reforms in 1069 upon his ascendance to office. Wang promulgated a community-based law enforcement and civil order known as the Baojia system. Wang Anshi attempted to diminish the importance of landholding and private wealth in favor of mutual-responsibility social groups that shared similar values and could be easily controlled by the government. Just as scholar-officials owed their social prestige to their government degrees, Wang wanted to structure all of society as a mass of dependents loyal to the central government. He used various means, including the prohibition of landlords offering loans to tenants; this role was assumed by the government. Wang established local militias that could aid the official standing army and lessen the constrained state budget expenses for the military. He set up low-cost loans for the benefit of rural farmers, whom he viewed as the backbone of the Song economy. Since the land tax exacted from rural farmers filled the state treasury's coffers, Wang implemented a reform to update the land-survey system so that more accurate assessments could be gathered. Wang removed the mandatory poetry requirement in the civil service exams, on the grounds that many otherwise skilled and knowledgeable Confucian students were being denied entry into the administration. Wang also established government monopolies for tea, salt, and wine production. All of these programs received heavy criticism from conservative ministerial peers, who believed his reforms damaged local family wealth which provided the basis for the production of examination candidates, managers, merchants, landlords, and other essential members of society. Historian Paul J. Smith writes that Wang's reforms—the New Policies—represented the professional bureaucratic elite's final attempt to bring the thriving economy under state control to remedy the lack of state resources in combating powerful enemies to the north—the Liao and Western Xia.

Winston W. Lo argues that Wang's obstinate behavior and inability to consider revision or annulment of his reforms stemmed from his conviction that he was a latter-day sage. Confucian scholars of the Song believed that the 'way' (dao) embodied in the Five Classics was known by the ancient sages and was transmitted from one sage to another in an almost telepathic manner, but after it reached Mencius (c. 372–c. 289 BC) there was no one worthy of accepting the transference of the dao. Some believed that the long dormant dao could be revived if one were truly a sage; Lo writes of Song Neo-Confucianists, "it is this self-image which explained their militant stand in relation to conventional ethics and scholarship." Wang defined his life mission as restoring the unity of dao, as he believed it had not departed from the world but had become fragmented by schools of Confucian thought, each one propagating only half-truths. Lo asserts that Wang, believing that he was in possession of the dao, followed Yi Zhi and the Duke of Zhou's classic examples in resisting the wishes of selfish or foolish men by ignoring criticism and public opinion. If unflinching certitude in his sagehood and faultless reforms was not enough, Wang sought potential allies and formed a coalition that became known as the New Policies Group, which in turn emboldened his known political rivals to band together in opposition to him. Yet factional power struggles were not steeped in ideological discourse alone; cliques had formed naturally with shifting alliances of professional elite lineages and efforts to obtain a greater share of available offices for one's immediate and extended kinship over vying competitors. People such as Su Shi also opposed Wang's faction on practical grounds; for example, Su's critical poem hinting that Wang's salt monopoly hindered effective salt distribution.

Wang resigned in 1076 and his leaderless faction faced uncertainty with the death of its patron emperor in 1085. The political faction led by the historian and official Sima Guang (1019–1086) then took control of the central government, allied with the dowager empress who acted as regent over the young Emperor Zhezong of Song (r. 1085–1100). Wang's new policies were completely reversed, including popular reforms like the tax substitution for corvée labor service. When Emperor Zhezong came of age and replaced his grandmother as the state power, he favored Wang's policies and once again instituted the reforms in 1093. The reform party was favored during the reign of Huizong (r. 1100–1125) while conservatives were persecuted—especially during the chancellery of Cai Jing (1047–1126). As each political faction gained advantage over the other, ministers of the opposing side were labeled "obstructionist" and were sent out of the capital to govern remote frontier regions of the empire. This form of political exile was not only politically damaging, but could also be physically threatening. Those who fell from favor could be sent to govern areas of the deep south where the deadly disease malaria was prevalent.

Familial rights, laws and customs
The Chinese philosophy of Confucius (551–479 BC) and the hierarchical social order his disciples adhered to had become embedded into mainstream Chinese culture since the reign of Emperor Wu of Han (r. 141–87 BC). During the Song Dynasty, the entire Chinese society was theoretically modelled upon this familial social order of superiors and inferiors. Confucian dogma dictated what was proper moral behavior, and how a superior should regulate rewards or punishments when dealing with an inferior member of society or one's family. This is exemplified in the Tang Dynasty law code, which was largely retained in the Song period. Gernet writes: "The family relationships supposed to exist in the ideal family were the foundation of the entire moral outlook, and even the law, in its total structure and its scale of penalties, was nothing but a codified expression of them."

Under the Tang law code compiled in the 7th century, severe punishments were outlined for those who disobeyed or disrespected the hierarchical system of elders. Those who assaulted their parents could be put to death, those who assaulted an older brother could be put to forced labor, and those who assaulted an older cousin could be sentenced to caning. A household servant who killed his master could be sentenced to death, while a master who killed his servant would be arrested and forced into a year of hard labor for the state. Yet this reverence for elders and superiors was grounded in more than just secular Confucian discourse; Chinese beliefs of ancestor worship transformed the identity of one's parents into abstract, otherworldly figures. Song society was also built on social relationships governed not by abstract principles, but on the protection gained by devoting oneself to a superior.

Perpetuating the religious family cult with many descendants was coupled with the notion that producing more children offered the family a layer of protection, reinforcing its power in the community. More children meant better odds of extending a family's power through marriage alliance with other prominent families, as well as better odds of having a child occupying a prestigious administrative post in government. Hymes notes that "elite families used such standards as official standing or wealth, prospects for office, length of pedigree, scholarly renown, and local reputation in choosing both sons-in-law and daughters-in-law." Since official promotion was considered by examination degree as well as recommendation to office by a superior, a family that acquired a significant amount of sons-in-law of high rank in the bureaucracy ensured kinship protection and prestigious career options for its members. Those who came from noteworthy families were treated with dignity, and a wider family influence meant a better chance for an individual to secure his own fortunes. No one was better prepared for society than one who gained plenty of experience in dealing with the members of his extended family, as it was common for upper-class families to have several generations living in the same household. However, one did not even have to share the same bloodline with others in order to build more social ties in their community. This could be done by accepting any number of artificial blood brothers in a ceremony assuring mutual obligations and shared loyalty.

In Song society, governed by the largely unaltered Tang era legal code, the act of primogeniture was not practiced in Chinese inheritance of property, and in fact was illegal. When the head of a family died, his offspring equally divided the property. This law was implemented in the Tang Dynasty in order to challenge the powerful aristocratic clans of the northwest, and to prevent the rise of a society domineered by landed nobility. If an official family did not produce another official within a few generations, the future prospects of that family remaining wealthy and influential became uncertain. Thus, the legal issues of familial inheritance had profound effects upon the rest of society.

When a member of the family died there were varying degrees of prostration and display of piety amongst family members, each one behaving differently according to the custom of kinship association with the deceased. There was to be no flashy or colorful attire while in the period of mourning, and proper funerary rituals were observed such as cleansing and clothing the deceased to rid him or her of impurities. This was one of the necessary steps in the observance of the deceased as one of the worshipped ancestors, which in turn raised the prestige of the family. Funerals were often expensive. A geomancer had to be consulted on where to bury the dead, caterers were hired to furnish the funeral banquet, and there was always the purchase of the coffin, which was burned along with paper images of horses, carriages, and servants in order for them to accompany the deceased into the next life. Due to the high cost of burial, most families opted for the cheaper practice of cremation. This was frowned upon by Confucian officials due to beliefs in the ancestral cult. They sought to ban the practice with prohibitions in 963 and 972; despite this, cremation amongst the poor and middle classes persisted. By the 12th century, the government came up with the solution of installing public cemeteries where a family's deceased could be buried on state owned property.

Women: legality and lifestyles
Historians note that women during the Tang Dynasty were brazen, assertive, active, and relatively more socially liberated than Song women. Women of the Song period are typically seen as well educated and interested in expressing themselves through poetry, yet more reserved, respectful, "slender, petite and dainty," according to Gernet. Evidence of foot binding as a new trend in the Southern Song period certainly reinforces this notion. However, the greater number of documents due to more widespread printing reveal a much more complex and rich reality about family life and Song women. Through written stories, legal cases, and other documents, many different sources show that Song women held considerable clout in family decision-making, and some were quite economically savvy. Men dominated the public sphere, while affluent wives spent most of their time indoors enjoying leisure activities and managing the household. However, women of the lower and middle classes were not solely bound to the domestic sphere. It was common for women to manage town inns, some to manage restaurants, farmers' daughters to weave mats and sell them on their own behalf, midwives to deliver babies, Buddhist nuns to study religious texts and sutras, female nurses to assist physicians, and women to keep a close eye on their own financial affairs. In the case of the latter, legal case documents describe childless widows who accused their nephews of stealing their property. There are also numerous mentions of women drawing upon their dowries to help their husband's sisters marry into other prominent families.

The economic prosperity of the Song period prompted many families to provide their daughters with larger dowries in order to attract the wealthiest sons-in-law to provide a stable life of economic security for their daughters. With large amounts of property allotted to a daughter's dowry, her family naturally sought benefits; as a result women's legal claims to property were greatly improved. Under certain circumstances, an unmarried daughter without brothers or a surviving mother without sons could inherit one-half of her father's share of undivided family property  Under the Song law code, if an heirless man left no clear successor to his property and household, it was his widowed wife's right to designate her own heir in a process called liji ("adopting an heir"). If an heir was appointed by the parents' relatives after their deaths, the "appointed" heir did not have the same rights as a biological son to inherit the estate; instead he shared juehu ("extinct household") property with the parents' daughter(s), if there were any.

Divorcing a spouse was permissible if there was mutual consent between husband and wife, while remarriage after the death of a spouse was common during the Song period. However, widows under post-Song dynasties did not often remarry, following the ethic of the Confucian philosopher Cheng Yi (1033–1107), who stated that it was better for a widow to die than lose her virtue by remarrying. Widows remarrying another after the death of a first spouse did not become common again until the late Qing Dynasty (1644–1912), yet such an action was still regarded as morally inferior.

Despite advances in relative social freedoms and legal rights, women were still expected to attend to the duties of the home. Along with child-rearing, women were responsible for spinning yarn, weaving cloth, sewing clothing, and cooking meals. Women who belonged to families that sold silk were especially busy, since their duties included coddling the silkworms, feeding them chopped mulberry tree leaves, and keeping them warm to ensure that they would eventually spin their cocoons. In the family pecking order, the dominant female of the household was the mother-in-law, who was free to hand out orders and privileges to the wives of her sons. Mothers often had strong ties with their grown and married sons, since these men often stayed at home. If a mother-in-law could not find sufficient domestic help from the daughters-in-law, there was a market for women to be bought as maids or servants. There were also many professional courtesans (and concubines brought into the house) who kept men busy in the pursuits of entertainment, relations, and romantic affairs. It was also common for wives to be jealous and conniving towards concubines that their wealthy husbands brought home. Yet two could play at this game. The ideal of the chaste, modest, and pious young woman was somewhat distorted in urban settings such as Hangzhou and Suzhou, where there were greedy and flirtatious women, as one author put it. This author stated that the husbands of these women could not satisfy them, and so took on as many as five 'complementary husbands'; if they lived close to a monastery, even Buddhist monks could suffice for additional lovers.

Although boys were taught at Confucian academies for the ultimate goal of government service, girls were often taught by their brothers how to read and write. By Song times, more women of the upper and educated classes were able to read due to advances in widespread printing, leaving behind a treasury of letters, poems, and other documents penned by women. Some women were educated enough to teach their sons before they were sent to an official school. For example, the mother of the statesman and scientist Shen Kuo taught him basic education and even military strategy that she had learned from her elder brother. Hu Wenrou, a granddaughter of a famous Song official Hu Su, was regarded by Shen Kuo as a remarkable female mathematician, as Shen would occasionally relay questions to Hu Wenrou through her husband in order for her to review and investigate possible errors in his mathematical work. Li Qingzhao (1084–1151), whose father was a friend of Su Shi, wrote many poems throughout her often turbulent life (only about 100 of these survive) and became a renowned poet during her lifetime. After the death of her husband, she wrote poems profusely about poring over his paintings, calligraphy, and ancient bronze vessels, as well as poems with deep emotional longing:

Religion and philosophy
Ancient Chinese Daoism, ancestor worship, and foreign-originated Buddhism were the most prominent religious practices in the Song period. Daoism developed largely from the teachings of the Daodejing, attributed to the 6th century BC philosopher Laozi ("Old Master"), considered one of the Three Pure Ones (the prime deities of Daoism). Buddhism in China, introduced by Yuezhi, Persian, and Kushan missionaries in the first and second centuries, gradually became more native in character and was transformed into distinct Chinese Buddhism.

Many followed the teachings of Buddha and prominent monks such as Dahui Zonggao (1089–1163) and Wuzhun Shifan (1178–1249). However, there were also many critics of Buddhism's religious and philosophical tenets. This included the ardent nativist, scholar, and statesman Ouyang Xiu, who called Buddhism a "curse" upon China, an alien tradition that infiltrated the native beliefs of his country while at its weakest during the Southern and Northern Dynasties (420–581). The contention over Buddhism was at times a divisive issue within the gentry class and even within families. For example, the historian Zeng Gong lamented over the success of Buddhism, viewing it as a competing ideology with 'the Way of the Sages' of Confucianism, yet on his death in 1083 was buried in a Buddhist temple that his grandfather had helped build and that his brother Zeng Bu was able to declare as a private Merit Cloister for the family. Although conservative proponents of native Confucianism were highly skeptical of the teachings of Buddhism and often sought to distance themselves from it, others used Buddhist teachings to bolster their own Confucian philosophy. The Neo-Confucian philosophers and brothers Cheng Hao and Cheng Yi of the 11th century sought philosophical explanations for the workings of principle (li) and vital energy (qi) in nature, responding to the notions of highly complex metaphysics in popular Buddhist thought. Neo-Confucian scholars also sought to borrow the Mahayana Buddhist ideal of self-sacrifice, welfare, and charity embodied in the bodhisattva. Seeking to replace the Buddhist monastery's once prominent role in societal welfare and charity, supporters of Neo-Confucianism converted this ideal into practical measures of state-sponsored support for the poor under a secular mission of ethical universalism. Buddhism never fully recovered after several major persecutions in China from the 5th through the 10th centuries, although Daoism continued to thrive in Song China. In northern China under the Jin Dynasty after 1127, the Daoist philosopher Wang Chongyang (1113–1170) established the Quanzhen School. Wang's seven disciples, known as the Seven Immortals, gained great fame throughout China. They included the prominent Daoist priestess Sun Bu'er (c. 1119–1182), who became a female role model in Daoism. There was also Qiu Chuji (1148–1227), who founded his own Quanzhen Daoist branch known as Longmen ("Dragon Gate"). In the Southern Song, cult centers of Daoism became popular at mountain sites that were reputed to be the earthly sojourns of Daoist deities; elite families had shrines erected in these mountain retreats in honor of the local deity thought to reside therein. Much more so than for Buddhist clergy, Daoist priests and holy men were sought when one prayed for having a son, when one was physically ill, or when there was need for change after a long spell of bad weather and poor harvest.

Chinese folk religion continued as a tradition in China, drawing upon aspects of both ancient Chinese mythology and ancestor worship. Many people believed that spirits and deities of the spirit realm regularly interacted with the realm of the living. This subject was popular in Song literature. Hong Mai (1123–1202), a prominent member of an official family from Jiangxi, wrote a popular book called The Record of the Listener, which had many anecdotes dealing with the spirit realm and people's supposed interactions with it. People in Song China believed that many of their daily misfortunes and blessings were caused by an array of different deities and spirits who interfered with their daily lives. These deities included the nationally accepted deities of Buddhism and Daoism, as well as the local deities and demons from specific geographic locations. If one displeased a long-dead relative, the dissatisfied ancestor would allegedly inflict natural ailments and illnesses. People also believed in mischievous demons and malevolent spirits who had the capability to extort sacrificial offerings meant for ancestors – in essence these were bullies of the spiritual realm. The Chinese believed that spirits and deities had the same emotions and drives as the living did. In some cases the chief deity of a local town or city was believed to act as a municipal official who could receive and dispatch orders on how to punish or reward spirits. Residents of cities offered many sacrifices to their divinities in hopes that their city would be spared from disasters such as fire. However, not only common people felt the need to appease local deities. Magistrates and officials sent from the capital to various places of the empire often had to ensure the locals that his authority was supported by the local deity.

Justice and law
One of the duties of scholar-officials was hearing judicial cases in court. However, the magistrates and prefects of the Song period were expected to know more than just the written laws. They were expected to promote morality in society, to punish the wicked, and carefully recognize in their sentences which party in a court case was truly at fault. It was often the most serious cases that came before the court; most people desired to settle legal quarrels privately, since court preparations were expensive. In ancient China, the accused in court were not viewed as fully innocent until proven otherwise, while even the accuser was viewed with suspicion by the judge. The accused were immediately put in filthy jails and nourished only by the efforts of friends and relatives. Yet the accuser also had to pay a price: in order to have their case heard, Gernet states that they had to provide an offering to the judge as "a matter of decorum."

Gernet points out that disputes requiring arrest were mostly avoided or settled privately. Yet historian Patricia Ebrey states that legal cases in the Song period portrayed the courts as being overwhelmed with cases of neighbors and relatives suing each other over property rights. The Song Dynasty author and official Yuan Cai (1140–1190) repeatedly warned against this, and like other officials of his time also cautioned his readers about the rise of banditry in Southern Song society and a need to physically protect self and property.

Vengeance and vigilantism
Chancellor Wang Anshi, also a renowned prose stylist, wrote a work on matters of state justice in the 11th century. Wang wrote that private interests, especially of those seeking vigilante justice, should in almost all circumstances never trump or interfere with public justice. In the ancient Classic of Rites, Rites of Zhou, and "Gongyang" commentary of the Spring and Autumn Annals, seeking vengeance for a violent crime against one's family is viewed as a moral and filial obligation, although in the Rites of Zhou state intervention between the instigating and avenging parties was emphasized. Wang believed that the state of Song China was far more stable than those in ancient times and abler to dispense fair justice. Although Wang praised the classic avenger Wu Zixu (526–484 BC), Michael Dalby writes that Wang "would have been filled with horror if Wu's deeds, so outdated in their political implications, had been repeated in Song times." For Wang, a victim exacting personal revenge against one who committed an egregious criminal act should only be considered acceptable when the government and its legal system became dysfunctional, chaotic, or ceased to exist. In his view, the hallmark of a properly functioning government was one where an innocent man was never executed. If this were to occur, his or her grieving relatives, friends, and associates should voice complaints to officials of ever increasing hierarchic status until grievances were properly addressed. If such a case reached the emperor—the last and final judge—and he decided that previous officials who heard the case had erred in their decisions, he would accordingly punish those officials and the original guilty party. If even the emperor for some reason made a fault in pardoning a party which was truly guilty, then Wang reasoned that the only explanation for a lack of justice was the will of heaven and its judgment which was beyond the control of mortal men. Wang insisted that submitting to the will of heaven in this regard was the right thing to do, while a murdered father or mother could still be honored through ritual sacrifices.

Court cases
Many Song court cases serve as examples for the promotion of morality in society. Using his knowledge and understanding of townsmen and farmers, one Song Dynasty judge made this ruling in the case of two brawling fishermen, who were labeled as Pan 52 and Li 7 by the court:

"Competition in Selling Fish Resulted in Assaults" "A proclamation: In the markets of the city the profits from commerce are monopolized by itinerant loiterers, while the little people from the rural villages are not allowed to sell their wares. There is not a single necessity of our clothing or food that is not the product of the fields of these old rustics. The men plow and the women weave. Their toil is extremely wearisome, yet what they gain from it is negligible, while manifold interest returns to these lazy idlers. This sort, in tens and hundreds, come together to form gangs. When the villagers come to sell things in the market place, before the goods have even left their hands, this crowd of idlers arrives and attacks them, assaulting them as a group. These idlers call this 'the boxing of the community family.' They are not at all afraid to act outrageously. I have myself seen that it is like this. Have they not given thought to the foodstuffs they require and the clothing they wear? Is it produced by these people of the marketplaces? Or is it produced by the rural farmers? When they recognize that these goods are produced by the farming people or the rural villages, how can they look at them in anger? How can they bully and insult them? Now, Pan Fifty-two and Li Seven are both fishmongers, but Pan lives in the city and fishmongering is his source of livelihood. Li Seven is a farmer, who does fishmongering between busy times. Pan Fifty-two at the end of the year has his profit, without having had the labor of raising the fish, but simply earning it from the selling of the fish. He hated Li and fought with him at the fish market. His lack of humanity is extreme! Li Seven is a village rustic. How could he fight with the itinerant armed loiterers who hang around the marketplace? Although no injuries resulted from the fight, we still must mete out some slight punishments. Pan Fifty-two is to be beaten fifteen blows with the heavy rod. In addition, Li Seven, although he is a village farmer, was still verbally abusive while the two men were stubbornly arguing. He clearly is not a man of simple and pure character. He must have done something to provoke this dispute. Li Seven is to be given a suspended sentence of a beating of ten blows, to be carried out if hereafter there are further violations."

Early forensic science
In the Song Dynasty, sheriffs were employed to investigate and apprehend suspected criminals, determining from the crime scene and evidence found on the body if the cause of death was disease, old age, an accident, or foul play. If murder was considered the cause, an official from the prefecture was sent to investigate and draw up a formal inquest, to be signed by witnesses and used in court. The documents of this inquest also included sketches of human bodies with details of where and what injuries were inflicted.

Song Ci (1186–1249) was a Chinese physician and judge during the Southern Song Dynasty. His famous work Collected Cases of Injustice Rectified was a basis for early forensic science in China. Song's predecessor Shen Kuo offered critical analysis of human anatomy, dispelling the old Chinese belief that the human throat had three valves instead of two. A Chinese autopsy in the early 12th century confirmed Shen's hypothesis of two throat valves: the esophagus and larynx. However, dissection and examination of human bodies for solving criminal cases was of interest to Song Ci. His work was compiled on the basis of other Chinese works dealing with justice and forensics. His book provided a list of types of death (strangulation, drowning, poison, blows, etc.) and a means of physical examination in order to distinguish between murder, suicide, or accident. Besides instructions on proper ways to examine corpses, Song Ci also provided instructions on providing first aid for victims close to death from hanging, drowning, sunstroke, freezing to death, and undernourishment. For the specific case of drowning, Song Ci advised using the first aid technique of artificial respiration. He wrote of examinations of victims' bodies performed in the open amongst official clerks and attendants, a coroner's assistant (or midwife in the case of women), actual accused suspect of the crime and relatives of the deceased, with the results of the autopsy called out loud to the group and noted in the inquest report. Song Ci wrote:

"In all doubtful and difficult inquests, as well as when influential families are involved in the dispute, [the deputed official] must select reliable and experienced coroner’s assistants and Recorders of good character who are circumspect and self-possessed to accompany him. [. . .] Call a brief halt and wait for the involved parties to arrive. Otherwise, there will be requests for private favors. Supposing an examination is held to get the facts, the clerks will sometimes accept bribes to alter the reports of the affair. If the officials and clerks suffer for their crimes, that is a minor matter. But, if the facts are altered, the judicial abuse may cost someone his life. Factual accuracy is supremely important."

Song Ci also shared his opinion that having the accused suspect of the murder present at the autopsy of his victim, in close proximity to the grieving relatives of the deceased, was a very powerful psychological tool for the authorities to gain confessions. In the earliest known case of forensic entomology, a villager was hacked to death with a sickle, which led the local magistrate to assemble all the villagers in a town square to lay down their sickles in order for blow flies to gather around which sickle still had unseen remnants of the victim's blood; when it became apparent which sickle was used as the murder weapon, the confessing murderer was arrested on the spot.

Although interests in human anatomy had a long tradition in the Western world, a forensic book such as Song Ci's did not appear in Western works until Roderic de Castro's book in the 17th century. There have been several modern books published about Song Ci's writing and translations of it into English. This includes W.A. Harland's Records of Washing away of Injuries (1855), Herbert Giles' The Hsi Yuan Lu, or Instructions to Coroners (1924), and Dr. Brian E. McKnight's The Washing Away of Wrongs: Forensic Medicine in Thirteenth-Century China (1981).

Wu and wen, violence and culture
During the Song Dynasty, for those without formal education, the quickest way to power and the upper echelons of society was to join the military. If a man had a successful career in the military and could boast of victorious battles, he had a sure path to success in politics. Exam-drafted scholar-officials came mostly from prominent families and could rely on their clan status to advance their careers and place in society. Many Song military officers did not have this advantage, and owed their status in society to the advantage that military power granted them. Many court eunuchs such as Tong Guan (1054–1126) were eager to enlist as officers in the central army since this was a means to elevate their position at court.

Ordinary soldiers were merely recruited or conscripted rural farmers, while surrendered bandits and mercenaries also joined the military. Soldiers were not awarded official status by Confucian scholars as belonging to one of the Four Occupations; the scholar-officials were wary of condoning or legitimizing those whose lives revolved around the uncivilized practices of wu (violence). Even though the military examinations, rankings, and posts were parallel to those of the civil order, scholar-officials and the gentry nonetheless viewed military pursuits as uncultivated. Despite this disdain and argument of moral high ground, scholar-officials often commanded troops and wielded military power. Yet scholar-officials were not at the apex of the military or even civilian order; at the pinnacle of society was the emperor. The emperor's use of violence was seen as a necessity to rein in rebellious elements of society and dominate violent and uncultivated Inner Asian tribes, who would then submit to the emperor and become transformed by China's superior wen (culture and civilization).

Catastrophe and reforms
In the year 960 the Song military had 378,000 enlisted soldiers. Around the turn of the 11th century its size had grown to 900,000 soldiers, increasing to 1,000,000 by the year 1022, and well over 1,250,000 by 1041. The overall expenses of upholding a military of this size consumed three-quarters of the state's entire annual revenue. To lessen the expense, in 1069 the Chancellor Wang Anshi created the institution of local militias as supporting units. In 1073, Wang Anshi created a new bureau of the central government called the Directorate of Weapons, which supervised the manufacture of armaments and ensured quality control.

Despite the size of the army and these beneficial reforms, the high ranks of Song military command were heavily corrupt. At the beginning of the 12th century, Song generals collected funds based on the number of troops they recorded; instead of using the funds to benefit troops, they used this money to bolster their own salaries. Troops of the standing army, meanwhile, were given very small salaries while assigned tasks of menial labor. The scholar-officials running the government often paid little attention to the plight of soldiers and even to the demands of officers, since they were seen as being on a lower tier in society. Fairbank writes that the "civilian domination of the military was part of the ruling elite's control of the state, but it left the state military weak."

The corruption of the high command and ineffectiveness of military strength was soon revealed once the Song made a joint effort with the Jurchen people to conquer the Khitan Liao Dynasty (916–1125). After the successful rebellion of the Jurchens against their Khitan masters, the Jurchen observed the weakness of the Song army and broke their pact, then attacked the Song as well. By 1127, the capital at Kaifeng was captured and northern China overrun, while the remnants of the Song court fled south to Hangzhou and established the Southern Song. This was a crucial blow to the Song military elites, as they had been closely tied to the political structure until 1127; afterwards they became alienated from the emperor and the Song court. Although they had lost northern China to the new Jurchen Jin Dynasty (1115–1234), this loss prompted the Song to make drastic and lasting military reforms. Emperor Gaozong, desperate to refill the decimated ranks of the central army, drafted men from all over the country. This had been done before, but not on the same scale. Only the most skilled soldiers became imperial guardsmen, while under Gaozong entire central army units were composed of soldiers from every region and background. The Southern Song eventually recovered their strength and commanded the loyalty of vaunted commanders such as Yue Fei (1103–1142), who successfully defended the border at the Huai River. The Jurchens and Song eventually signed a peace treaty in 1141.

In 1131, the Chinese writer Zhang Yi noted the importance of employing a navy to fight the Jin, writing that China had to regard the sea and the river as her Great Wall, and use warships as its greatest watchtowers. Although navies had been used in China since the ancient Spring and Autumn Period (722–481 BC), China's first permanent standing navy was established by the Southern Song in 1132. The Jurchen launched an invasion against the Southern Song along the length of the Yangtze River, which resulted in two crucial Song victories at the Battle of Caishi and Battle of Tangdao in 1161. The Jin navy was defeated by the Song's standing navy, which employed trebuchets on their ships' top deckhouses to launch gunpowder bombs.

Organization, equipment and techniques


In the Song Dynasty, infantry units were organized 50 men to a platoon, two platoons to a company, and those into battalions of 500 men each. During the Northern Song Dynasty, half of the entire army of 1 million was stationed in and around Kaifeng. The remaining troops were posted in scattered forces along borders and near large municipalities, and in peacetime were used as means to maintain local security. Although the Song military was rife with corruption and largely ignored by civil officials, it did provide some valuable strengths to the empire. During the Song era, military drills and training were studied as a science, while elite soldiers were allocated different responsibilities based on examinations of their skills in weaponry and athletic ability. In their training, soldiers and officers were prepared for battle by following signal standards for troop movement, advancing when a flag or banner was raised, halting when the blaring sound of bells and drums rang out.

Song crossbowmen comprised their own separate units apart from the infantry, and according to the Chinese Wujing Zongyao military manuscript of 1044, the crossbow used in mass was the most effective weapon used against northern nomadic cavalry charges. Elite crossbowmen were also valued as long-range snipers; such was the case when the Liao Dynasty general Xiao Talin was picked off by a Song crossbow at the Battle of Shanzhou in 1004. Crossbows were mass-produced in state armories with designs improving as time went on, such as the use of a mulberry wood and brass crossbow in 1068 that could pierce a tree at 140 paces. Song cavalry used an array of different weapons, including halberds, swords, bows, and fire lances that discharged a gunpowder blast of flame and shrapnel. In preparation for war, government armories manufactured weapons in enormous quantities, with tens of millions of arrowheads crafted each year, along with armor components by the tens of thousands. There were sixteen known varieties of catapults in the Song period, designed to fit many different proportions and requiring work crews in sizes ranging from dozens to several hundred men.

Unlike many other Chinese dynasties throughout history, the Song Dynasty did not model its military infrastructure and organization on the precedent of northern nomadic armies, such as the earlier Xianbei and later Mongols. Only twice in the Song era were non-Chinese people employed in Song cavalry units: in the beginning of the dynasty with the campaigns of Emperor Taizu, and later 13th century Mongol defectors who came over to fight for the Song. With the Khitan and Tangut kingdoms possessing much of the pasture and grazing lands in the north, the Song Dynasty military had a shortage of horses for cavalry. To make up for this shortage, statesmen like Wang Anshi advocated greater ties with Tibet, as the tea-horse trade with Tibet was continued by the Ming Dynasty. Still, the Song established considerably large navies: in the 10th century, in the war to reunite China, and then a standing navy in the 12th century. Many of the warships in the Song Dynasty's navy were paddle-wheel driven crafts and some Song naval ships could carry up to 1,000 soldiers. It was also during the Song period that naval ships were first armed with gunpowder weapons. The use of enormous pontoon bridges in the Song era on at least one occasion was essential to victory. The Song built a large floating bridge across the Yangtze River in 974; while troops were under attack, the pontoon bridge was used as a means of transport for troops and supplies to the other bank during the early Song conquest of the Southern Tang state.

Ethnic, foreign and religious minorities
Much like the multicultural and metropolitan atmosphere of the earlier Tang capital at Chang'an, the Song capitals at Kaifeng and Hangzhou were home to an array of traveling foreigners and ethnic minorities. There was a great amount of contact with the outside world. Trade and tribute embassies from Egypt, Yemen, India, Korea, the Kara-Khanid Khanate of Central Asia and elsewhere came to Song China in order to bolster trade relations, while the Chinese sent embassies abroad to encourage foreign trade. Song Chinese trade ships traveled to ports in Japan, Champa in southern Vietnam, Srivijaya in Maritime Southeast Asia, Bengal and South India, and the coasts of East Africa.

During the 9th century, the Tang seaport at Guangzhou had a large Muslim population. During the Song Dynasty the importance of the latter seaport declined as the ports of Quanzhou and Fuzhou in Fujian province eclipsed it. This was followed by a decline of Middle Eastern sea merchants in China and an increasing amount of Chinese ship owners engaging in maritime trade. However, Middle Eastern merchants and other foreigners were not entirely absent, and some even gained administrative posts. For example, the Muslim Pu Shougeng—of either Persian or Arab descent—served as the Commissioner of Merchant Shipping for Quanzhou between the years 1250 and 1275. There was also the Arab astronomer Ma Yize (910–1005), who became the chief astronomer of the Song court under Taizu. Aside from these elites, Chinese seaports were filled with resident Arabs, Persians, and Koreans who had special enclaves designated for each of them.

Muslims represented the largest religious minority within Song China, although there were many others. There was a community of Kaifeng Jews who followed the exodus of the Song court to Hangzhou once the Jurchens invaded the north in 1126. Manichaeism from Persia was introduced during the Tang; during the Song, the Manichaean sects were most prominent in Fujian and Zhejiang. Nestorian Christianity in China had for the most part died out after the Tang Dynasty; however, it was revived during the Mongol invasions in the 13th century. Followers of Zoroastrianism still had temples in China as well. Prospects of studying Chinese Chan Buddhism attracted foreign Buddhists to China, such as Enni Ben'en (圓爾辯圓; 1201–1280) of Japan who studied under the eminent Chinese monk Wuzhun Shifan (1178–1249) before establishing Tōfuku-ji in Kyoto. Tansen Sen states that Buddhist monks traveling from India to China and vice versa during the Song surpassed that of the Tang Dynasty, while "Indian texts translated under the Song dynasty outnumbered those completed under the preceding dynasties."

There were many native ethnic groups within Song China that did not belong to the Han Chinese majority. This included the Yao people, who staged tribal uprisings against the Song in Guangdong in 1035 and Hunan in 1043, during the reign of Emperor Renzong of Song (r. 1023–1064). Song authorities employed Zhuang people as local officials in what is now Guangxi and Guangdong, where the Song placed them in charge of distributing land to the Yao and other tribal groups. The Yao peoples and others on the empire's frontier were incorporated into a feudal system, or fengjian shehui, which Ralph A. Litzinger says bypassed any possible native development of a primitive slave society, or nuli shehui, since the Yao and others lacked a sedentary tradition. Although mainland Chinese states made efforts to settle parts of Hainan Island since the 3rd century BC, it was not until the Song Dynasty that a concerted effort was made to assimilate the Li people of its highlands, who at times had fought against and repelled Han Chinese settlers. During the 11th century, the Man people of Hainan wreaked havoc by joining bandit gangs of ten to several hundred men. The statesman Ouyang Xiu estimated in 1043 that there were at least several thousand Man bandits residing in a dozen or so prefectures of mainland China.

To counter powerful neighbors such as the Kingdom of Dali (934–1253), the Song made alliances with tribal groups in southwest China which served as a protective buffer between their borders and Dali's. As long as these ethnic tribal groups paid tribute to the Song court and agreed to follow the course of its foreign policy, the Song agreed to grant military protection and allow the tribal leaders hereditary, autonomous local rule. During the 1050s, the Song Dynasty put down local tribal insurrections along their borders with the Lý Dynasty of Đại Việt, while their relations with Tai peoples and alliances with local clan leaders in the southern frontier led to a border war with Lý from 1075 to 1077.