Ximen Bao

Ximen Bao was a Chinese hydraulic engineer, philosopher, and politician. He was a government minister and court advisor to Marquis Wen of Wei (reigned 445–396 BC) during the Warring States period of ancient China. He was known as an early rationalist, who had the State of Wei abolish the practice of sacrificing people to the river god He Bo. Although the earlier statesman Sunshu Ao is credited as China's first hydraulic engineer (damming a river to create a large irrigation reservoir), Ximen Bao is nonetheless credited as the first engineer in China to create a large canal irrigation system.

Life
Ximen Bao became well known in his lifetime and posthumously for his grandiose works in hydraulic engineering during the 5th century BC. He organized a massive diversion of the Zhang River, which had formerly flowed into the Yellow River River at Anyang. The new course that the river took under his diversion project brought the river to meet the Yellow River further down its course at a bend near modern-day Tianjin. The Zhang River rises in the mountains of Shanxi province, flowing southeastwards, and at the time added to the burden of overflow for the Yellow River. Ultimately though, the purpose of this enormous project of engineering was to irrigate a large agricultural region of Henei (in the left lower Yellow River basin) by providing it with a natural contour canal.

Work on the canal system began sometime between 403 BC and 387 BC, when Marquis Wen and his successor Marquis Wu reigned over the State of Wei. Due to several setbacks (including some temporary local resistance to corvee labor service) it was not fully completed until a century later, during the time of Wen's grandson, King Xiang (襄王) (r. 319–296 BC). It was during this time that the Wei engineer Shi Chi completed the work of Ximen Bao.

Hebo's Bride
Ximen Bao is the central figure in a popular historical event called Hebo's Bride.

Around 400BC, Ximen was appointed to oversee the County of Ye (鄴城), a poor region that experienced constant flooding. He met with the locals to inquire on the challenges facing the populace. To Ximen's surprise, instead of naming the flooding as their biggest challenge, locals told him it was the high taxes they had to pay for providing a bride for Hebo, the River God - it was severely draining their finance and for those who have young daughters, lived in fear. With support from many village elders, three powerful elders known as San Lao (三老) colluded with the local officials (廷椽) and a shamaness to concoct a legend that the flooding was caused by the wrath of Hebo. To appease the god, the locals must sacrifice a beautiful young maiden as his bride every year. The cabal heavily taxed the county, used a small portion of the money to arrange for the bridal ceremony and divided the rest for themselves. Any family that could not afford to pay the tax would have its daughter taken as sacrifice - she would be dressed up the day of, and following a ceremony - put on a makeshift boat, and send floating on the river until it fell apart and together they sunk into the river. Many families with young daughters, fearing they would be taken, would send their daughters away; resulting in further social and economic issues for the county.

On the day of the ceremony, Ximen arrived at the sacrificial site by the river and met with the shamaness, her disciples, the three elders, the local officials, several village elders, and the maiden; with an estimated over a thousand onlookers also in attendance. Ximen insisted on inspecting the maiden and concluded her beauty would not meet the standard of a God. Declaring that the delivery of an inadequate bride would trigger the wrath of the River God, Ximen ordered the ceremony be postponed until after a suitable bride is found. He had his soldiers threw the shamaness into the river to report to the River God about the postponement and to report back to Ximen on the God's response. Sometime after, as the drowned shamaness had obviously not returned from the river, he tasked each of her disciples with the same mission and to locate the shamaness before submerging each one into the river. After neither of them returned, Ximen tasked each of the three elders with the same mission and threw them into the river. As neither the shamaness, her disciples, nor the elders returned from the river; Ximen ordered the local officials and the village elders to go into the river to fetch them. All of them instead knelt before him in terror and promised not to do the sacrifice again. After that day, bridal sacrifice for the River God became a thing of the past in the County of Ye.

Afterwards, Ximen then surveyed the terrain and saw where the river could pass. He enlisted the common people to divert the river into 12 canals, which not only reduced the water flow, but also irrigated the farmland. At the beginning, the common people complained that opening the canal was tiring and tiring, but after the canals was completed, everyone benefited from the project, there was no more danger of floods, and the crops were doubled. From then on, the people in Ye lived and worked in peace and prosperity.

Legacy
In honor of the Zhang River diversion project, the local populace made a popular song about it, as recorded in the historical work of the later Han dynasty historian Ban Gu.