The Samurai-dokoro (ä¾ÂæÂ - Board of Retainers) was an office of the Kamakura and Muromachi shogunates. The role of the Samurai-dokoro was to take the leadership of gokenin, the shogun's retainers, and to be in charge of the imprisonment of criminals. It was established in 1180 by Minamoto no Yoritomo, the founder of the Kamakura shogunate.
During the Kamakura period, the Samurai-dokoro was in charge of calling in and directing the gokenin, the shogun's retainers. It was also in charge of the imprisonment of criminals.
The office was administered by officials called shoshi or samuraidokoro-no-tsukasa, who were made up from the most powerful gokenin. The most senior of the officials, the president of the Samurai-dokoro, was called bettà Â. The office was established by Minamoto no Yoritomo in 1180, who appointed Wada Yoshimori its first bettà Â. However, after Yoshimori was killed during the Wada Rebellion, the shikken (regent of the shogunate) took over the post of bettà Â.
In the Engyobon Heike Monogatari, the Samurai-dokoro was established upon the request of Wada Yoshimori, and it was modeled after the Taira government period office called samurai bettà  that Fujiwara no Tadakiyo was appointed to rule over the samurai of the eight provinces of Bandà  (present-day Kantà  region). If this is true, the Samurai-dokoro was not modeled after the household agency of noble families that shares the same name.
As Yoritomo's position rose, the Samurai-dokoro began to also take on the role of a domestic administration institution. In the Kenkyà « era, Wada Yoshimori, the bettà Â, was in charge of military affairs in general as well as domestic administration, and Kajiwara Kagetoki, a shoshi, was in charge of directing the gokenin, the basis of the Kamakura shogunate.
Under the Muromachi shogunate, the Samurai-dokoro was led by a tà Ânin or shoshi, who was assisted by a shoshi-dai. Bugyà Ânin was in charge of administrative paperwork, and there were junior officers, kodoneri, zà Âshiki, and others. Additionally, kaikà  took on the duties of a clerk, metsuke worked as an inspector, and yoriudo took on the duties of an investigator, among other officials.
The Samurai-dokoro was largely dependent on the military power of the daimyo, and in reality the shoshi-dai, a high-ranking retainer of the shoshi, was in charge of the Samurai-dokoro. During events like the Tsuchi-ikki peasant uprising, a powerful military was required to suppress the chaotic situation, and in such cases the Samurai-dokoro asked help from the daimyo and the kenmon (powerful families).
Between the late Muromachi period and the Sengoku period, shoshi and shoshi-dai were no longer appointed, and the kaikà  was in turn charge of the Samurai-dokoro. The shogunate bugyà Ânin was appointed this post and was either from the Matsuda clan or the êno'o clan. The kaikà  was required to stay in Kyoto and be in charge of Kyoto's public security and the management of prisons, and also served as an advisor to the shogun and other kenmon on judgements. Additionally, after mid-Muromachi period, the kaikà  formed its own military by recruiting local Kyoto jizamurai and skilled vagrants. After the à Ânin War (1467-77), the military power of the shoshi weakened, and the kaikà Â<nowiki/>'s hikan and the officials of another Samurai-dokoro took over the public security. Additionally, the military power of the kaikà  directly played a part in the military power of the Ashikaga shoguns, and according to the records at the time, the kaikà  could mobilize an estimated 200 to 300 men.