Zhang Yuxian (張遇賢) (died 943?), (also known by his self-claimed title of "King of the Eight Kingdoms of Middle Heaven" (中天八國王), was an agrarian and religious rebel leader of the Chinese Five Dynasties and Ten Kingdoms Period, who first rose against Southern Han and whose forces eventually battled and were defeated by the armies of Southern Tang, Southern Han's northern neighbor. After his defeat, his general Li Tai (李台) arrested him and delivered him to the Southern Tang army to be executed.
Rebellion against Southern Han
Little is known about Zhang Yuxian's background besides the fact that he served as a minor official at the county government of Boluo County.
In 942, Southern Han was ruled by Emperor Liu Bin. Many disorganized groups of bandits were dispersed throughout Xun Prefecture (循州, in modern Huizhou). They came to support Zhang to lead the overall movement, and he took the title of "King of the Eight Kingdoms of Middle Heaven" and established a government. His army attacked the coastal region and seized much of the territory. However, it was said that he himself was young, lacking experience and strategy. He took reports from his generals but had little direction for them.
Liu Bin reacted by sending his brothers Liu Hongchang, Prince of Yue, and Liu Honggao, the Prince of Xun, to command an army against Zhang. However, Zhang's army surrounded and defeated them. Only through the efforts of the officer Chen Daoxiang (陳道庠) were the two princes able to escape. Most of Southern Han's eastern prefectures fell to Zhang, including Xun. However, in the summer of 943, the Han general Wan Jingxin (萬景忻) defeated Zhang's army at Xun.
Campaign against Southern Tang
After the defeat by Wan Jingxin, Zhang thereafter led his followers over the Nan Mountains and headed for Qian. Southern Tang's military governor of Baisheng Circuit (百勝, headquartered at Qian), Jia Kuanghao (賈匡浩), did not anticipate the invasion. Zhang, whose followers were said to be over 100,000 by this point, captured many counties of Qian Prefecture and defeated its army, such that Jia was forced to close its gates to defend it. Zhang set up his headquarters at Baiyun Cave (白雲洞, in modern Ganzhou) and built a palace and government buildings; from there, he sent his army out to raid the surroundings.
The Southern Tang emperor Li Jing sent the officer Yan En (嚴恩) to lead an army against Zhang, with the official Bian Hao serving as Yan's army monitor. Bian, under the advice of his strategist Bai Changyu (白昌裕), was successful against Zhang. Under Bai's advice, Bian opened up a road through the forest and attacked Zhang from the rear. Zhang abandoned his army and fled to his general Li Tai. Li instead arrested Zhang and surrendered him to the Southern Tang army. Zhang was then taken to Southern Tang's capital Jinling and promptly executed.