The shogunate was the political system in which a warrior chief, the sei-i taishōgun ("barbarian-quelling generalissimo"), opened a military government and exercised power, the shogun's regime standing beside the imperial court and forming a dual polity of court and warrior house. In 1192 Minamoto no Yoritomo was appointed shogun and established the Kamakura shogunate, beginning warrior rule; after the brief Kenmu restoration at the end of the Kamakura period, the Muromachi shogunate was founded in 1336, its authority declining after the mid-fifteenth century as Japan fell into the warring states. In 1600 Tokugawa Ieyasu won the Battle of Sekigahara and in 1603 became shogun, founding the Edo shogunate, which ruled for more than 260 years under the domain system and the seclusion policy, with relative social stability. The shogunate was nominally appointed by the emperor but actually held the powers of land enfeoffment, military command and foreign relations, and the daimyo were tightly controlled under the domain system. In 1867 the last shogun Tokugawa Yoshinobu returned power to the court, and after the Boshin War the following year warrior rule ended completely, the Meiji Restoration building a modern state centred on the emperor. The shogunate lasted some seven hundred years and is the main axis of Japan's medieval and early modern political history.