Japanese institution of the retainers
 was an institution of the retainers ("kashin") of the shogun or a "daimyo" in Japan that became a class of samurai. It was divided into the military commanders ("bankata") and the civil officers ("yakukata").
In the Nanboku-chō and Muromachi periods, the "kashindan" began to include members of the clan that it served. In the Sengoku period, in response to the need for a strong military organization with a centralized power structure, the daimyo organized their own "kashindan" as a standing army. By the Edo period, they had become a discrete class of samurai, and each family was paid an annual stipend according to its rank. The "kashindan" was abolished in 1871 as part of the Meiji Restoration.
History.
Medieval period.
In and before the Kamakura period, the clan head and its members, who were related to the clan head, had one type of a cooperative relationship comparable to that of a kin community. However, during the Nanboku-chō and Muromachi periods, the clan heads began to place their own clan members among the retainers of the clan, and ranked them as their "kashin". This gave birth to the distinctive "kashidan" of the post-Nanboku-chō period samurai institution. During this period, the collective body made up from the lord and the "kashindan" was called "kachū".
In the Sengoku period, the daimyo organized their own "kashindan" as a standing army in response to the need for a strong military organization with a centralized power structure. In particular, Oda Nobunaga, one of the leading figures of the Sengoku period, organized a professional army by creating a class of full-time samurai soldiers made up of "jizamurai" and mercenaries, who were removed from their peacetime agriculture. After the 1588 sword hunt ordered by Toyotomi Hideyoshi, and the following "heinōbunri" policy, a clear distinction between the peasants and the samurai was made, which paved way to a more organized "kashindan" of the daimyo. This resulted in vast gaps in status between the members of the "kashindan", the samurai who had chosen to fight; and the hereditary "nanushi" (village heads), the samurai who had chosen to farm during the "heinōbunri".
Edo period.
During the Edo period, the "kashindan" became a fixed samurai class, and defined the political world of the samurai for centuries. The "kashindan" held significant power in relation to the ruler; they made him swear to rule justly, to promote them in accordance to actual merit and to not assassinate them based on the suspicion of treason without telling them beforehand. Each samurai family that was in the "kashindan" of a daimyo, or the shogun, was paid an annual land stipend ("chigyō") or rice stipend ("fuchimai") according the rank of the family. In exchange to this, the daimyo imposed severe criminal laws with the aim of deterrence, and held the right to make judgements on criminals. The "kashindan" lived in the vicinity of the daimyo's castle, and as they were affiliated with a single daimyo, they were segregated from the samurai outside their own domain.
Shinichi Kitaoka describes the "kashindan" of the Edo period as "patrimonial bureaucratic vassal bands". The patrimonial aspect of the Edo period "kashindan" made them more dependent on the daimyo than their Kamakura period counterparts, creating a unique institution that differentiated the "kashindan" from the feudal retinue of medieval Europe. The Tokugawa shogunate leaned towards a patrimonial system similar to many ancient empires while still containing some elements of feudalism. According to Kitaoka, for this reason, the concept of feudalism is not applicable to the Edo period "kashindan".
Unlike the Kamakura period "kashindan" that had deteriorated economically, the "kashindan" of the Edo period daimyo were economically stable. This was the result of a set of strict laws and social rules on land trade, mortgage and inheritance. It was forbidden to sell land to a fief, and to mortgage it was restricted and only allowed temporarily. Although there were generally no laws regulating inheritance, social rules discouraged the division of heritage, and the obedience from the children and wives to the judgement of the parent was paramount. Generally, the eldest son born of the official wife was presumed to be the heir, and the younger sons had practically no chance at becoming high-ranking samurai like "hatamoto". Because of this, the size of the "kashindan" was almost completely fixed, and the stability in numbers was presupposed.
The members of the Tokugawa clan and "fudai daimyo" were appointed to posts at the top of the ruling structure, such as "karō" and "bugyō". On the other hand, former retainers ("kashin") of the local lord class ("zaichi ryōshu-sō"), who had served under Tokugawa clan, were appointed as "tozama daimyo" and "kunimochi daimyo". Furthermore, the military units were all organized into separate "kumi", and the lower-ranked samurai, including the "rōtō", "chūgen", and "komono", were commanded by a "kumigashira" ("group head").
Abolition and legacy.
At the end of the Edo period, during the Bakumatsu, the "kashidan" served as the only official forum for political action in response to the political and social crisis when the Tokugawa shogunate ended. The "kashidan" was officially abolished in 1871 as part of the Meiji Restoration. Its abolition led to a financial crisis among the low and middle-ranking samurai, who no longer had access to their traditional income and privilege. The former "kashindan" failed to establish an organized class-based resistance against this, and the resistance was limited to the Tōbaku Movement and local associations which had no chance against the centralized Meiji government.
The "kashindan", who were required to live near their lord's castle, affected the development of cities under the modern municipal system, and most cities established in the Meiji era were former castle towns.
Terminology.
While the term "kashindan" refers to the institution of retainers in the samurai society, the term "kashin" ("house retainer"), meaning a retainer in the service of a family, is synonymous with "kerai" and "kenin", and can also refer to retainers in the service of "kuge" (court aristocracy), "nanushi" and landowners.