The Kamakura shogunate was a Japanese military government of imperial-aristocratic rule that governed over the country from 1185 to 1333. The heads of government were the sh?guns. Sh?gun is the short term for Sei-i Taish?gun, a title given to the commander-in-chief who would lead an army against people resisting the rule of the Japanese imperial court. The sh?gun's rank and position were hereditary. Officially they were appointed by the emperor, but they were de facto rulers of the country. A sh?gun's office was the “shogunate” or bafuku. The first three sh?guns were members of the Minamoto clan. The years that the shoguns ruled were known as the Kamakura period which takes the name from where the Minamoto shoguns lived.