In 221 Liu Bei declared himself emperor at Chengdu with the Han dynastic name - Shu Han - standing with Cao Wei and Eastern Wu. After the defeat at Yiling in 222, Liu Bei entrusted his heir at Baidicheng; under Zhuge Liang's regency the state pacified the Nanzhong (the 'seven captures of Meng Huo' belong to that southern campaign), mended ties with Wu, fostered agriculture - and marched north five times to restore the Han, in vain. In 263 the last ruler Liu Shan surrendered; Shu Han fell, two reigns and forty-three years. Holding the single province of Yi against the Central Plains for so long, with strict law and clean government, it won later admiration; Chen Shou's Records of the Three Kingdoms and Luo Guanzhong's Romance fixed its rulers and ministers in the world's memory.