In Japan's history, social strata based on inherited position rather than personal merit, were rigid and highly formalized in a system called mibunsei (身分制). At the top were the Emperor and Court nobles (kuge), together with the Shōgun and daimyō. Below them, the population was divided into four classes: samurai, peasants, craftsmen and merchants.