In feudal Japan, the daimyos were military lords while the samurai were warriors or knights under their command. When the first Americans entered Japan in the middle of the 19th century, there were reputed to be around 250 daimyos overseeing a total of 35,000 samurai.
Daimyos were firstly landowners, whose income, power and activities were closely monitored by the shogun, the commander-in-chief of the nation. Even the marriage and social circles of each daimyo required the shogun's approval, mainly in order to prevent plotting and conspiratorial arrangements between separate districts. Daimyos were also required to pay for repairs to their district's infrastructure, as a safeguard against them becoming too rich and influential. The daimyos were also responsible for paying the modest salaries of the samurai under their command.
The feudal Japanese class system was clearly defined. Under the samurai were farmers, who represented around 80 percent of the population. Also under the samurai were the artisans and merchants, although these were among the wealthiest classes in Japanese society.
Above the daimyos, the shogun was essentially the ruler of Japan, despite being nominally answerable to the emperor. In fact, the emperor had little actual power and, since he rarely left the palace or even had visitors without the shogun's approval, he was more of a pampered prisoner, supported solely to serve as an object of worship and reverence for the Japanese people.