Sakimori was a military system carried out under in ancient China and in Japan under the Ritsuryo system (a system of centralized government based on the ritsuryo code) from the Asuka period to the Heian period.
Sakimori in China
In China, sakimori ('fangren' in Chinese) was deployed for the security of outlying territories and the soldiers were conscripted from farming villages. The term of service was three years although it was often extended. Soldiers had to pay for their own food and weaponry.
Sakimori in Japan
In Japan, sakimori was deployed for the defense of outlying territories such as the coast of Kyushu due to the fear of a possible invasion by Tang Dynasty China after the major defeat suffered by Japanese troops, who had been dispatched to aid Baekje on the Korean peninsula, by the allied forces of Tang Dynasty China and the Silla Kingdom at the Battle of Baekgang in 663.
As was the case in China, the term of service was three years, troops were dispatched from provincial legions, the term of service was often extended, and soldiers had to pay for their own food and weaponry.
These forces were under the command of the Dazaifu (local government office in the Kyushu region)
Because the soldiers, who were mainly drafted from eastern Japan which had a larger population, were not exempt from taxation during their service, they bore a heavy burden as farmers and it is thought that morale was low. Since 757, soldiers were only conscripted from Kyushu.
During the Heian period, in 792 during the reign of Emperor Kanmu, the Kondei-no-sei (national militant organization) was established which abolished legions and troops, and the Imperial Court, which placed importance on the quantity rather than the quality of soldiers for national defense, postponed the abolition of sakimori.
In actuality, the only conflict to have taken place between sakimori troops and a foreign force was the Toi invasion of 1019 in which Jurchen people from the coastal region of China invaded northern Kyushu through Tsushima Island. When Hokumen no Bushi (Northern Guard), Tsuibushi (Pursuit and Apprehension Agents), Oryoshi (Suppression and Control Agent) and regional samurai groups formed during Japan's period of cloistered imperial rule, the cloistered emperors who emphasized the quality of troops gradually reduced the sizes of sakimori legions, and the system eventually vanished along with the Dazaifu.
"Manyoshu" (Collection of Ten Thousand Leaves), a collection of poetry written during the Nara period, contains more than 100 poems collectively called sakimori-no-uta (Sakimori poems) that were composed by soldiers drafted for sakimori and their family members. Many of the poems are composed in eastern dialects such as that of the Kanto region and, along with Azumauta (eastern Japanese poems), depict ancient lifestyles.