Following the loosening of central government control due to the repercussions of the
Yellow Turban Rebellion, bandits and rebels sprung up everywhere. One such bandit group under
Zhang Niujue (張牛角, aka Oxhorn Zhang), unrelated to the Yellow Turban movement, rose to power in the hill countries of the Taihang Mountains by plundering the western areas of the
North China Plain. In 185, Zhang Niujue and fellow bandit
Chu Yan (褚燕) joined forces to raid the town of Yingtao (癭陶). Zhang Niujue was killed in the skirmish, and his followers followed his last order to join Chu Yan. Chu Yan changed his surname to Zhang to honour his fallen colleague, so he became known as Zhang Yan. Soon, he became the nominal chief of all bandits east of the
Taihang range, forming a confederacy of bandits known as the Heishan bandits. His ranks grew steadily in number until they were said to reach a million. They conducted raids in the
commanderies of
Changshan (常山),
Zhao (趙),
Zhongshan (中山),
Shangdang (上黨) and
Henei (河內). While Zhu Jun was able to push them away from the capital, the Han were unable to control the situation north of the Yellow River, the government accepted a nominal surrender and offered the bandits official positions. However, when the central government fell under
Dong Zhuo's chaotic control in 189, the Heishan bandits went back to their former activities. In the civil wars that followed the unsuccessful
campaign against Dong Zhuo, Zhang Yan and the Heishan bandits apparently sided with
Gongsun Zan and thus attacked commanderies that were in the possession of Gongsun Zan's enemies. In 191 the Heishan bandits raided
Dong Commandery (東郡), under the control of
Yuan Shao's associate
Cao Cao, but were driven back. Early in 193, the bandits and a contingent of the Southern
Xiongnu under
Yufuluo aided Yuan Shu, who was driven out of his original territory of Nanyang (南陽) by Yuan Shao's ally
Liu Biao, in Chenliu (陳留). As Chenliu was also within Cao Cao's territories, he swiftly defeated the allies and chased Yuan Shu away to the south. Later, the Heishan bandits under
Yu Du (于毒), joined by local rebels, stormed Yuan Shao's
Ye city, capital of
Wei Commandery (魏郡), and killed its Grand Administrator (太守) Li Cheng (栗成). This last attack drew Yuan Shao's furious retaliation; he led a suppression campaign to crush the bandits, slaying Yu Du and many other Heishan leaders, but Yuan Shao was ultimately unable to defeat Zhang Yan, who had the backing of various Xiongnu and
Wuhuan groups. With heavy casualties on both sides, the opposing armies made a swift withdrawal from the area. Yuan Shao's campaign might have diminished the Heishan bandits' prospects in the south, but Zhang Yan and his people continued to hold out in the northern
Changshan Commandery. In 199, Zhang Yan answered Gongsun Zan's call for help as he made his last stand in the
Battle of Yijing, but his bandit army did not arrive in time and thus could not save Gongsun Zan from his demise. In 205, as Cao Cao drove out the Yuan family from the region, Zhang Yan led his men to submit to Cao Cao. ==Names of the bandits==