quality:correction, structural:expansion
Boshin War

The Boshin War (戊辰戦争, Boshin Sensō) was fought between January 1868 and May 1869. The alliance of samurai from southern and western domains and court officials had now secured the cooperation of the young Emperor Meiji, who ordered the dissolution of the two-hundred-year-old Tokugawa shogunate. Tokugawa Yoshinobu launched a military campaign to seize the emperor's court in Kyoto. However, the tide rapidly turned in favor of the smaller but relatively modernized imperial faction and resulted in defections of many daimyōs to the Imperial side. The Battle of Toba–Fushimi was a decisive victory in which a combined army from Chōshū, Tosa, and Satsuma domains defeated the Tokugawa army. A series of battles were then fought in pursuit of supporters of the Shogunate; Edo surrendered to the Imperial forces and afterward, Yoshinobu personally surrendered. Yoshinobu was stripped of all his power by Emperor Meiji and most of Japan accepted the emperor's rule.

Pro-Tokugawa remnants retreated to northern Honshū (Ōuetsu Reppan Dōmei) and later to Ezo (present-day Hokkaidō), where they established the breakaway Republic of Ezo. An expeditionary force was dispatched by the new government and the Ezo Republic forces were overwhelmed. The siege of Hakodate came to an end in May 1869 and the remaining forces surrendered.