The Reign of Emperor Xuanzong
Xuanzong came to power at a time of bitter rivalry among court officials, and he moved quickly to put his own stamp on the government.
The Fall of Li Deyu
The dominant figure at Wuzong's court had been the chancellor Li Deyu. Xuanzong disliked his hold on power and removed him within days of taking the throne, sending him out of the capital as military governor of Jingnan. Over the following years officials associated with Li Deyu were dismissed, and Li Deyu himself was demoted again and again, partly over the case of a minor official, Wu Xiang, whose execution under Wuzong was now judged to have been unjust. He died in exile at Yai Prefecture, on the island of Hainan, around 850.
Reversing Wuzong's Policies
Xuanzong ended the persecution of Buddhism that Wuzong had begun in the Huichang era, allowing monasteries to be rebuilt and monks and nuns to return. He brought in Bai Minzhong as his leading chancellor in place of Li Deyu.
The Recovery of the North-West
Since the An Lushan rebellion of the 750s, the Tibetan empire had held much of the Tang's north-west, including the Hexi Corridor, the route to Central Asia. In the 840s Tibetan power collapsed in civil war, and Xuanzong took advantage. In 848 Zhang Yichao, a local Han Chinese leader at Shazhou (Dunhuang), drove out the Tibetan officials, and in 849 Tang forces recovered a number of frontier prefectures further east. In 851 Zhang Yichao submitted the prefectures of Hexi to the Tang. Xuanzong made him military governor of a new Guiyi circuit.
The Tangut Rebellion
The Tanguts in the north-west rose in rebellion, and the campaigns against them went badly. Concluding that the risings had been provoked by the abuses of local officials, Xuanzong replaced them with men of better reputation and in 851 sent Bai Minzhong to oversee the region. The Tanguts submitted the same year. Bai did not return to the capital as chancellor during Xuanzong's lifetime, and Linghu Tao became the leading chancellor in his place.
A Careful Ruler
The histories describe Xuanzong as diligent, thrifty and attentive to detail, reading memorials closely and keeping a firm hand on his officials and his own family. He was less successful with the eunuchs, whose control of the palace armies he never managed to break.