Chinese Tang military general
Wu Yuanji (吳元濟) (783 or 793 – December 12, 817) was a Chinese military general during the Tang dynasty who tried to control Zhangyi Circuit (彰義, headquartered in modern Zhumadian, Henan) without approval from Emperor Xianzong after the 814 death of his father Wu Shaoyang, who had governed the circuit in a "de facto" independent manner from the imperial government. Emperor Xianzong declared a campaign against Wu, and imperial troops under Li Su were eventually able to defeat and capture him. He was delivered to the Tang capital Chang'an and executed there.
Background.
The biographies of Wu Yuanji in the "Old Book of Tang" and the "New Book of Tang" conflict as to when he was born — with the "Old Book of Tang" indicating that he was born in 783 and the "New Book of Tang" indicating that he was born in 793. In any case, a major part of Wu Yuanji's life would have been spent during the time when his father Wu Shaoyang served under Wu Shaocheng the military governor ("Jiedushi") of Zhangyi Circuit — who was not biologically related to Wu Yuanji but who was endeared to Wu Shaoyang and treated Wu Shaoyang as a cousin. In 809, when Wu Shaocheng was seriously ill, Wu Shaoyang killed Wu Shaocheng's son Wu Yuanqing (吳元慶) and took over control of the circuit. Then-reigning Emperor Xianzong, already engaged in a campaign against another warlord, Wang Chengzong the military governor of Chengde Circuit (成德, headquartered in modern Shijiazhuang, Hebei), was unable to act against Wu Shaoyang, and thus made Wu Shaoyang acting military governor and then military governor of Zhangyi.
Wu Yuanji was Wu Shaoyang's oldest son, and he had at least two younger brothers. While Wu Shaoyang governed the circuit, Wu Yuanji was made the acting prefect of Zhangyi's capital prefecture Cai Prefecture (蔡州).
Campaign against the imperial government.
Wu Shaoyang's death and aftermaths.
In 814, Wu Shaoyang died. Wu Yuanji kept Wu Shaoyang's death a secret and reported to the imperial government that Wu Shaoyang was ill; meanwhile, he took over control of the circuit. Previously, Wu Shaoyang's staff members Su Zhao (蘇兆) and Yang Yuanqing (楊元卿), as well as his officer Hou Weiqing (侯惟清), had all recommended that Wu Shaoyang go to the capital Chang'an to pay homage to Emperor Xianzong, to show submission to the imperial government, and after Wu Yuanji took over, he suspected them of betraying him. He thus killed Su and imprisoned Hou. At that time, Yang was at Chang'an, and hearing this news, he informed the chancellor Li Jifu of all of Zhangyi's strengths and weaknesses. At Yang's suggestion, the messengers that Zhangyi had sent to the other circuits were detained where they were. Further, contrary to customs that, when a major general died, that the emperor would declare a day of mourning, the imperial government did not do so, but mobilized the armies of the circuits around Zhangyi to prepare for a campaign. With these events occurring, Wu Yuanji killed Yang's wife and four sons and used their blood to paint the archery range. He made Wu Shaocheng's son-in-law Dong Chongzhi (董重質) his main strategist.
Meanwhile, with Li Jifu advocating a campaign against Zhangyi, Emperor Xianzong prepared for one. At the suggestion of another chancellor, Zhang Hongjing, Emperor Xianzong declared a day of mourning for Wu Shaoyang and sent the official Li Junhe (李君何) to Zhangyi to mourn Wu Shaoyang, to see how Wu Yuanji would react. Wu Yuanji, however, refused Li Junhe admission to the circuit, and further mobilized his army. He attacked Wuyang (舞陽, in modern Luohe, Henan) and slaughtered its population; burned Ye County (葉縣, in modern Pingdingshan, Henan); and pillaged Lushan (魯山, in modern Pingdingshan) and Xiangcheng (襄城, in modern Xuchang, Henan). Li Junhe was forced to return to Chang'an.
Initial stages.
Emperor Xianzong put the general Yan Shou (嚴綬) in command of the overall operations against Zhangyi and mobilized the armies of 16 circuits. In spring 815, after some small victories against Zhangyi, Yan became careless, and the Zhangyi forces fought back, defeating him at Ciqiu (磁丘, in modern Zhumadian), forcing him to flee back to Tang Prefecture (唐州, in modern Zhumadian). The Zhangyi forces also defeated the troops from Shou Prefecture (壽州, in modern Lu'an, Anhui), forcing the prefect of Shou Prefecture, Linghu Tong (令狐通), to flee back to Shou's main city, while the Zhangyi forces slaughtered the Shou troops remaining on the border.
Meanwhile, Wu Yuanji sought help from Wang Chengzong (the imperial campaign against whom ended in 810 with Emperor Xianzong agreeing to formally make Wang military governor and Wang agreeing to formally submit to imperial authority) and Li Shidao the military governor of Pinglu Circuit (平盧, headquartered in modern Tai'an, Shandong). Both Wang and Li pleaded with Emperor Xianzong on Wu's behalf, seeking his exoneration. Emperor Xianzong refused. In response, Li sent his soldiers to conduct guerilla warfare in the regions of the eastern capital Luoyang. Later, believing that assassinating the pro-campaign chancellor Wu Yuanheng and the official Pei Du would cause the other officials to advocate peace, Li also sent assassins to kill Wu Yuanheng and Pei; Wu Yuanheng died in the attack, but Pei was only wounded. Emperor Xianzong subsequently made Pei a chancellor and became further resolved to continue the campaign. Further, not yet learning of Li's involvement and believing that Wang was behind the assassinations, he ordered another campaign against Wang.
With Yan not making much headway against Zhangyi forces, in late 815, Emperor Xianzong put Han Hong the military governor of Xuanwu Circuit (宣武, headquartered in modern Kaifeng, Henan) in charge of the operations against Zhangyi instead, but it was said that Han did not fully embrace the campaign and did not work hard toward Zhangyi's destruction. With the imperial troops converging, both sides had victories — although it was noted by historians that the imperial generals often exaggerated their victories against Zhangyi forces and hid their defeats from the emperor. The imperial generals Li Guangyan the military governor of Zhongwu Circuit (忠武, headquartered in modern Xuchang) and Wu Chongyin the military governor of Heyang Circuit (河陽, headquartered in modern Pingdingshan) were having success against Zhangyi forces, but in spring 816, Zhangyi forces dealt Gao Xiayu (高霞寓) the military governor of Tangsuideng Circuit (唐隨鄧, headquartered at Tang Prefecture) a major defeat, such that Gao barely escaped with his life. Emperor Xianzong demoted Gao and Li Xun (李遜) the military governor of Shannan East Circuit (山南東道, headquartered in modern Xiangfan, Hubei) and replaced Gao with Yuan Zi. When Yuan subsequently took a passive stance against Zhangyi, however, Emperor Xianzong replaced him with Li Su.
Decades later, after Du Mu interviewed Dong Chongzhi with regard to his memories about these years of the Zhangyi campaign, Du recounted what Dong told him:
 ;templatestyles src="Template:Blockquote/styles.css" / ;I had inquired of the former Huaixi [(i.e., Zhangyi)] general Dong Chongzhi about why the imperial government's intense attacks on armies of just the three prefectures [(i.e., Zhangyi's three prefectures)] lasted four years and were unable to succeed. Dong told me: "The central government mobilized too many mixed kinds of troops. Because the soldiers from distant circuits, who were guests on other circuits' territories, could not themselves function as units due to their small numbers, they had to rely on the host circuits for everything. They were weak and of low morale, and often after defeats they would simply desert. The first two years, Huaixi forces were continually victorious, and the soldiers they killed were largely these guest soldiers. However, after the first two years, there were fewer guest soldiers, and Huaixi forces had to directly engage the regular troops of Zhongwu and Heyang Circuits. Therefore, even if Li Su did not make a surprise attack on Cai Prefecture, Huaixi could not stand indefinitely. If the central government had ordered E [(鄂州, in modern Wuhan, Hubei)], Shou, and Tang Prefectures to just protect their boundaries and not attack, and sent the Zhongwu and Zhenghua [(鄭滑, headquartered in modern Anyang, Henan)] forces, along with specialized archers from Xuan [(宣州, in modern Xuancheng, Anhui)] and Run [(潤州, in modern Zhenjiang, Jiangsu)] Prefectures to blockade Huaixi's borders, within a year, Cai Prefecture would have fallen.
Defeat by Li Su.
As Li Su was not well known, and the Zhangyi forces had defeated Gao Xiayu and Yuan Zi previously, it was said that the Zhangyi forces did not consider Li a threat and did not take much precautions against him. Li, after receiving reinforcements from several circuits, began to carry out military actions in which he targeted Zhangyi officers, captured them, and then treated them well and incorporated them into his command structure, using their familiarity with Zhangyi's defenses against Zhangyi. Such Zhangyi officers he thus captured included Ding Shiliang (丁士良), Chen Guangqia (陳光洽), Wu Xiulin (吳秀琳), Li Xian (李憲, whose name Li Su changed to Li Zhongyi (李忠義)), and Li You. Meanwhile, with Zhangyi's food supplies running low, the people were forced to initially resort to eating water caltrop, fish, freshwater turtles, birds, and beasts, but after those plants and animals ran out, the people started surrendering to the imperial forces en masse. The Zhangyi forces, believing that detaining the people would merely lead to quicker drain on resources, did not stop them.
Meanwhile, in addition to Li Su, Li Guangyan and Wu Chongyin were also continuing to deal Wu Yuanji defeats, capturing the important city of Yancheng (郾城, in modern Luohe) in summer 817. Wu Yuanji put Dong Chongzhi in charge of his strongest army, which rode mules, and Dong was stationed at Huiqu (洄曲, near Yancheng) to defend against further attacks by imperial forces from Yancheng. Pei Du volunteered to serve as the overall commander of the operations, and Emperor Xianzong agreed. Pei soon arrived on the front and personally monitored the troop advancements. With Zhangyi in great difficulty, Wu Yuanji offered to surrender to Emperor Xianzong, and Emperor Xianzong was initially inclined to accept and promised not to execute Wu, but with Dong opposing capitulation, Wu's surrender never came.
On November 27, 815, at dusk, Li Su launched an attack, from his then-base of Wencheng Fence (文成柵, in modern Zhumadian), and, after dusk, after destroying the bridges between Huiqu and Cai Prefecture, and with a major winter snowstorm serving as cover, he advanced quickly to Cai Prefecture. With Li You and Li Zhongyi leading the forward attack, Li Su's forward soldiers climbed up the city walls and surprised the defending soldiers, killing them without engagements and then opening the city to allow the remainder of Li Su's soldiers to enter. Li Su's forces then attacked Wu Yuanji's fortified mansion. Wu Yuanji still commanded his own guards to defend against the attack. During the battle, Li Su, believing that Wu Yuanji's last hope would be if Dong returned quickly to save him, personally visited Dong's house and asked Dong's son Dong Chuandao (董傳道) to go to Dong Chongzhi's camp to express Li Su's good faith. Dong Chongzhi immediately abandoned his troops and returned to Cai Prefecture to surrender to Li Su. On November 29, with even the residents of Cai Prefecture joining the attack on Wu's headquarters, Wu surrendered. Li Su put him under arrest and delivered him to Chang'an.
Death.
On December 12, Emperor Xianzong ascended the palace gate to receive Wu Yuanji as a captive. He had Wu delivered to the imperial ancestral temples, as if to be offered as a sacrifice, and then had him beheaded under a lone willow.
During Wu's campaign against the imperial government, Li Shidao had sent his officer Liu Yanping (劉晏平) to Zhangyi as a messenger to observe Wu's status. After Liu returned to Pinglu, he gave this report to Li Shidao as far as his observation of Wu was concerned:
 ;templatestyles src="Template:Blockquote/styles.css" / ;Wu Yuanji tossed several tens of thousands of soldiers to the wilderness. He is under great danger, yet he daily gamble and game with his concubines and servants within his large mansion. He was comfortable and did not worry at all. Based on my observations, he will be destroyed, and such destruction will not be long from now.