 A second Jin campaign in late 1217 did marginally better than the first . In the east , the Jin made little <unk> in the Huai River valley , but in the west they captured <unk> and <unk> Pass ( <unk> ; modern Shaanxi ) in late 1217 . The Jin tried to captured <unk> in <unk> South circuit again in 1218 and 1219 , but failed . A Song counteroffensive in early 1218 captured <unk> and in 1219 the Jin cities of <unk> and <unk> were pillaged twice by a Song army commanded by Zhao Fang ( <unk> ; d . 1221 ) . In the west , command of the Song forces in Sichuan was given to An Bing , who had previously been dismissed from this position . He successfully defended the western front , but was unable to advance further because of local uprisings in the area . The Jin tried to <unk> an indemnity from the Song but never received it . In the last of the three campaigns , in early 1221 , the Jin captured the city of Qizhou ( <unk> ; in Huainan West ) deep in Song territory . Song armies led by Hu <unk> and Li Quan ( <unk> ; d . 1231 ) defeated the Jin , who then withdrew . In 1224 both sides agreed on a peace treaty that ended the annual tributes to the Jin . <unk> missions between the Jin and Song were also cut off . 
