Japanese castes under the Ritsuryō

When the Ritsuryō legal system was starting to be enforced in Japan at the end of the 7th century, it included, as in Tang China, a division between those two major castes.

Caste was part of the citizen registration enforced with the ritsuryō.

Good citizens) were the upper-class, divided into the four following subcastes[citation needed] The Senmin (lit.

low citizens) were the lower-class, divided into the five following subcastes: Intercaste marriage was at first not allowed.

This caste system was not very rigid, in the sense that Kunuhi could become Kanko when they got older (66), and automatically freed at very old age (76) but this is unlikely as most people would not reach the age of 66 and over during these times, and Ryōmin could become Senmin (at the Kanko level) after having committed some crimes.