The Hamaguri Rebellion (禁門の変)

The Hamaguri Rebellion (kinmon no hen) occurred on August 20, 1864 (the first year of the Genji era, July 19th in the old calendar) in the final days of the Edo period. It is also known as the Incident at the Forbidden Gate, the Incident at the Hamaguri (Clam) Gate, the Genji Incident, and the Incident in the First Year of Genji.

"Forbidden Gate" is an abbreviation of "the gate of the forbidden palace" (meaning the Emperor's palace). The reason it came to be called Hamaguri (Clam) Gate was that during the great Tenmei fire (on January 30, 1788 in the old calendar), the gate, which had until then always remained closed, was opened for the first time, and thus resembled a clam's shell opening in response to being subjected to fire.
The Hamaguri Gate is located on the west side of the modern-day Imperial gardens in Kyoto; before the Great Tenmei fire, it was known as the Shinzaike Gate
The Incident at the Forbidden Gate also came to be called the Hamaguri Rebellion because the fiercest fighting occurred near the Hamaguri Gate. Even today, bullet holes remain in the beams of the gate.

Summary

Choshu han (clan) had raised the sonno joi (Revere the Emperor, Expel the Barbarians) slogan and begun interfering in the political situation in Kyoto; in 1863, the Aizu and Satsuma clans joined forces and on August 18 launched a coup to expel Choshu from Kyoto.

The daimyo (Japanese territorial lord) of Choshu, Tadachika MORI, and his son Sadahiro MORI were ordered into house arrest in their hometown and lost their authority to lead politically, but in the capital and in Osaka, several Imperial loyalists from Choshu continued to work secretly to restore the Emperor to power.

Arriving in 1864, those in Choshu debated whether to adopt a proactive plan to march on Kyoto in a second attempt to win Emperor Komei over to the Choshu camp (at this point, the two arguing for the active advance on Kyoto were Matabe KIJIMA and Genzui KUSAKA.)
Those who opposed the plan included Kogoro KATSURA and Shinsaku TAKASUGI of the prudence faction). When word of the July 8 Ikedaya Incident, in which the Shinsengumi forces had assassinated domainal samurai warriors, reached Choshu, the prudence faction, which included Masanosuke SUFU, Shinsaku TAKASUGI, and Samanosuke SHISHIDO, tried to calm the raging debate in the clan, but members of the activist faction, like the elders of the three clans, Echigo (Mototake) FUKUHARA, Uemonnosuke (Kanenobu) MASUDA, and Shinano (Chikasuke) KUNISHI, cunningly created a group designed to destroy Satsuma, against whom there was considerable enmity, and to that end they prepared for battle; Masuda and Gensui KUSAKA began gathering troops at Mt. Tenno and Mt. Takara in the town of Oyamazaki, while Kunishi and Matabe KIJIMA gathered troops at Saga Tenryu-ji temple, and Echigo FUKUHARA at the Choshu estate at Fushimi.

Within the Imperial Court, there was a struggle between hard-liners that wanted to destroy Choshu's military force and others who wished to appease them, while Keiki HITOTSUBASHI (later known as Shogun Yoshinobu TOKUGAWA), who served as Viceroy and Protector of the Imperial Palace, called on the soldiers to withdraw, but the Choshu soldiers clashed with various groups of samurai warriors from Aizu, Kuwana, and Satsuma clans near Kyoto's Hamaguri Gate (in the Kamigyo ward of modern-day Kyoto); but the forces of Choshu, chanting their Revere the Emperor slogan, were annihilated, and Matabe KIJIMA, Gensui KUSAKA, and Chusaburo TERAJIMA were among those who died in battle. At that time, the daimyo of Aizu, Katamori MATSUDAIRA, who was charged with the defense of Kyoto, had started cooperating with the Satsuma clan, and set up a system to oppress the radical loyalist faction in Choshu.

Using the fact that the Choshu loyalists dared to fire their guns in the direction of the Imperial palace during the Hamaguri rebellion as a pretext, the Tokugawa shogunate labeled Choshu domain an official enemy of the Court, and as such launched the First Punitive Expedition against them.

After the battle, the Choshu forces, who managed to escape, set fire to the Choshu estate in Kyoto and fled, while the Aizu forces attacked an estate near the Nakadachiuri Gate, thought to be where Choshu soldiers were hiding. Because of the flames rising from these two places the neighborhoods and the entire city of Kyoto were struck by the great fire known as the 'don-don yake' (quick quick burning), in which everything between Ichijo avenue on the north all the way to the Main Mausoleum of the Shin (Pure Land) Sect (which refers to Higashi Hongan-ji temple) on Shichijo avenue to the south, a wide swath of land and many temples and shrines, were destroyed by fire.