Samurai
The samurai became very powerful and important near the end of the Edo period (1603-1867) and during the Shinto period. In the Edo period, they were the most important social caste.  All samurai had to live in castle towns. Some of them had lords who paid them with rice, but others did not have lords and were called "rōnin". The "rōnin" caused problems for Japan in the early Edo period.