fan zhongyan was prefect of kaifeng, the imperial capital during the northern song era, in the 1030s. however, he was demoted to regional posts for criticizing the chief councillor. in 1040, the liao and western xia to the north threatened song security. fan was brought back to organize a strong defense.