Li Yuanhao (1003-1048), chief of the Tangut Tuoba clan, was founding emperor of Western Xia. The Tuoba had held Xiazhou since the late Tang, invested generation after generation by the central courts; on his succession Yuanhao ordered the Tuoba tonsure and new raiment, had Yeli Renrong create the Tangut script, set the offices and the army, and in 1038 proclaimed himself emperor of the Great Xia — Western Xia in the histories. War with Song followed: Sanchuankou in 1040, Haoshuichuan in 1041, Dingchuanzhai in 1042, Song armies beaten again and again and the Northern Song's western front stretched to breaking; in 1044 when Liao's Xingzong campaigned in person, Yuanhao drew him deep and broke him at Hequ, and that year made the Qingli peace with Song — an annual grant of silver, silk and tea of two hundred fifty thousand, Yuanhao subject by name while emperor at home. Years of war swelled his pride: he deposed Empress Yeli and took his heir Ninglingge's wife, and in 1048 Ninglingge's knife killed him; the consort clan Mocang set the child Liangzuo on the throne. Western Xia, Tangut and Chinese institutions together in mountain fastness, stood near two hundred years — its script, offices and framework all shaped at Yuanhao's hand.