When Mitsuhide AKECHI became the ruler of Fukuchiyama, he drastically changed the course of the river by building an embankment as long as one km for the purpose of developing the castle's residential area which later became a castle town, and improved the flow of the river; however, since floods still occurred, subsequent administrators spared no effort towards flood control.
明智光秀が福知山を統治するようになると、光秀は後に城下町ともなる城に連なる居住地造営と治水のため、長さ1kmにも及ぶ築堤により川筋を大幅に変更したことにより由良川の流れは大幅に改善されたが、それでも洪水は収まらずその後の為政者も治水に尽力を惜しまなかった。