The samurai (侍) were members of the warrior class in Japan. They were originally provincial warriors who came from wealthy landowning families who could afford to train their men to be mounted archers. In the 8th century AD, the imperial court downsized the national army and delegated the security of the countryside to these privately trained warriors. Eventually, due to regressive tax policies, the samurai clans grew so wealthy and powerful that they became the de facto rulers of the country.
https://en.wikipedia.org/wiki/Samurai