Bakufu (幕府) literally means “tent office”, referring to the headquarter of a field commander in battle. It later denoted the “house of a general”, or the government of a shogun. There were three periods of shogunal rule in Japanese history:
Kamakura bakufu (1192–1333)
In the late Heian period, the House of Minamoto (源) invaded Kyoto during the so-called Genpei Wars (1180–1185, 源平合戦 genpei kassen) between the Minamoto and the Taira (平) clan, resulting in the fall of the latter and the establishment of the Kamakura bakufu under Minamoto no Yoritomo, who seized the power from the central government and the court aristocracy and strengthened the role of the military.
While the emperor lived a secluded life at court, he could formally still issue imperial orders that had to be obeyed even by the shogun. More often than not, the military government pressured the imperial court not to interfere in politics. The Kakamura period saw two unsuccessful Mongolian invasions, repelled by the armies of the shogun and adverse elements, as well as the two lines of imperial families striving for power during the Kemmu Restoration (建武の新政 kenmu no shinsei): the line of Emperor Go-Saga (後嵯峨天皇 Go-Saga-tennō) and Emperor Go-Daigo (後醍醐天皇 Go-Daigo-tennō). The conflict and the eventual demise of the Kamakura bakufu was triggered by the lack of land to be rewarded after the defeat of the Mongolian invaders.
Muromachi bakufu (1338-1573)
The Muromachi bakufu, also known as Ashikaga bakufu, was established in Kyoto by Ashikaga Takauji (足利尊氏) in 1336. Ashikaga, de-facto leader of the Minamoto clan, was sent by the Kamakura bakufu to surpress the revolt of the Hōjō vassals hailing from the rival Taira clan. However, Ashikaga turned against the Kamakura bakufu and supported the Imperial court. As Ashikaga sided with the court, he had to share more powers, leading to a weakened shogunate. His rule started the Nanboku-chō period (1336-1392, 南北朝時代 nanboku-chō jidai), when a Northern and a Southern Court competed for power.
Tokugawa bakufu (1603–1867)
After the Battle of Sekigahara in 1600, Tokugawa Ieyasu, claiming descendance from the powerful Minamoto (源) clan, seized power and installed a shogunate in Edo (Tokugawa bakufu 徳川幕府 or Edo bakufu 江戸幕府). The Tokugawa bakufu lasted until the Meiji Restoration in 1867. The Tokugawa shoguns, not the emperor in Kyoto, held the effective power, controlling foreign policy, the military, and feudal patronage. They established a han (feudal domain) system and implemented a policy of isolation (鎖国 sakoku, “locked country).
Bakumatsu (幕末, lit. “end of the curtain”) describes the final period of the Tokugawa bakufu, between 1853, when Commodore Matthew C. Perry forcefully opened Japan to Western powers, and 1867, when the last shogun Tokugawa Yoshinobu surrendered his powers, transferring the rule to the Meiji emperor.