In 808, an incident occurred that, as later historians opined, precipitated the later partisan struggles between the "Niu Party" and the "Li Party" that would eventually occur throughout the reigns of the five emperors after Emperor Xianzong. At a special imperial examinations where Emperor Xianzong ordered that low-level officials submit honest opinions about the government, several of the examinees—Niu Sengru, Li Zongmin, and Huangfu Shi () stated, without using any veiled language, the issues they saw with the governance at the time. The officials that Emperor Xianzong put in charge of the examinations, Yang Yuling () and Wei Guanzhi ranked them high. However, the chancellor Li Jifu saw these as severe criticisms of himself, and, weeping, accused the reviewing officials, the imperial scholars Pei Ji and Wang Ya, of conflict of interest—as Huangfu was a nephew of Wang's. As a result of Li Jifu's accusations, Wang, Pei, Yang, and Wei were all demoted, and it was said that while no harm came to Niu, Li Zongmin, and Huangfu at that time, they were effectively stuck at the positions they previously served without promotion. As a result, they all sought positions as staff members of military governors. (Niu and Li Zongmin would later become key leaders of the "Niu Party," while Li Jifu's son Li Deyu would become a key leader of the "Li Party.") Also around that time, the Shatuo tribes, which had long been vassals of Tang's long-term adversary Tufan, fearing that Tufan was set to move them to the interior of the Tufan state, rebelled against Tufan and surrendered to Tang, under the leadership of Zhuxie Zhiyi (). They were initially settled at Shuofang Circuit (朔方, headquartered in modern Yinchuan, Ningxia) and later moved to Hedong Circuit (河東, headquartered in modern Taiyuan, Shanxi); their chieftains of the Zhuxie clan were given the area of Huanghuadui (黃花堆, in modern Shuozhou, Shanxi) as their base of operations. (The Shatuo would eventually become a major part of the Tang army, and would yet later yield the ruling families of Later Tang, Later Jin, and Later Han, after Tang's end.)