Ximen Bao, founder of China's first irrigation work, was once a military officer in theWeiStateduring the Warring States Period (475-221BC). He later became a magistrate of Ye (present-day Zhang County in Heibei Province of Central China) during the ruling of the Marquis Wen of theWeiState.
Marquis Wen was in power from 446BC to 396BC when Ye was affected by frequent floods. When Ximen Bao took up office at Ye, he came upon a local sorcery wherein a maiden was sacrificed every year as a bride for the so-called River God. Ximen Bao soon made a law to stop the sorcery, but the witch and the corrupt local official provoked the masses against him. Ximen Bao made researches himself on the conditions of the river and told people the truth. He turned the witch's trick to her own use, throwing the witch and corrupt official into the river.
After that Ximen Bao worked to bring the river under control and built 12 irrigation canals along theZhangshuiRiver. Since then flood seldom occurred and local agriculture production flourished. Ximen Bao was regarded as the founder of China's irrigation works for building the first canal irrigation system in Chinese history.