not attempt to regulate prices and markets, with the exception of the time of Wang Anshi, though it also instituted an indirect monopoly in salt, in which merchants had to deliver grain to the state before being allowed to sell salt. In 1069, Wang Anshi, whose ideas were similar to the modern welfare state, became chancellor. Believing that the state must provide for the people, and pressed by the need for revenues to wage an irredentist war against the Xi Xia and Liao, he initiated a series of reforms. These reforms included nationalising industries such as tea, salt and liquor, and adopting a policy of directly transporting goods in abundance in one region to another, which Wang believed would eliminate the need for merchants. Other policies included a rural credit program for peasants, the replacement of corvee labour with a tax, lending peasants military horses for use in peacetime, compulsory military training for civilians, and a "market exchange bureau" to set prices. These policies were extremely controversial, especially to Orthodox Confucians who favoured laissez faire, and were largely repealed after Wang Anshi's death, except during the reign of Emperor Huizong. A second, more serious attempt to intervene in the economy occurred in the late 13th century, when the Song dynasty suffered from fiscal problems while trying to defend themselves against Mongol invasions. The Song chancellor Jia Sidao attempted to solve the problem through land nationalisation, a policy that was heavily opposed and later withdrawn. Song collapse The prosperity of the Song was interrupted by the invasion of Jur'chen Jin in 1127. After a successful alliance with the Jin in which the Song destroyed its old enemy the Khitan, the Jin attacked the Song and sacked its capital in Kaifeng. The invasion preceded 15 years of constant warfare which ended when the Song court surrendered territory north of the Huai River in exchange for peace, despite victories by the Song general Yue Fei, who had almost defeated the Jur'chens. The southern Chinese provinces became the center of commerce. Millions of Chinese fled Jur'chen rule to the South, which the Song dynasty still held. Due to the new military pressure of the Jur'chens, the Southern Song massively increased the tax burden to several times of that of the Northern Song. The Southern Song maintained an uneasy truce with the Jin until the rise of the Mongols, with whom Song allied to destroy