In the middle of the ninth century, the Imperial Court and kokushi started taking measures based on specifications of rinji-hatsuhei (the special dispatch of troops) in Tsuibu-zainin no Jo (the article related to catching criminals who had fled) in bumo-ryo code (Penalties on escaping soldiers, Sakimori [soldiers garrisoned at strategic posts in Kyushu in ancient times], slave, and so on) in the Yoro ritsuryo code, to combat these robberies and acts of piracy.
9世紀中葉における朝廷・国司は、群盗海賊の制圧のために養老律令の捕亡令追捕罪人条にある臨時発兵規定により対応し始めた。