The shoguns sought to produce social stability by imposing on the Japanese people a social order based on clearly defined and rigidly maintained class lines. At the top of this social pyramid was the nominal ruler of Japan, the emperor, and his court nobles. Second in rank, but first in power and privilege, was the ruling samurai warrior class whose leader was the shogun. In a total population of roughly thirty million, about two million Japanese belonged to the elite samurai class. A person was born a member of a samurai family.