One of the most important reasons for the restoration of Buddhism to a position of minimal acceptance was the role of Buddhist monks in repelling the Japanese invasions of Korea, which occurred between 1592 and 1598. At that time, the government was weak from internal squabbles, and was not initially able to muster strong resistance to the incursion. The plight of the country encouraged some leaders of the sangha to organize monks into guerrilla units, which enjoyed some instrumental successes. The "righteous monk" (義士; "uisa") movement spread during this eight-year war, finally including several thousand monks, led by the aging Seosan Hyujeong (서산대사, 西山休靜; 1520–1604), a first-rate Seon master and the author of a number of important religious texts. The presence of the monks' army was a critical factor in the eventual expulsion of the Japanese invaders.