The Bakumatsu (幕末, bakumatsu, "Late Tokugawa Shogunate"), are the final years of the Edo period (1853-1868) during which Japan ended its isolationist foreign policy, known as Sakoku, and transitioned from a feudal shogunate to the Meiji government.
The Bakumatsu started with the arrival of Commodore Matthew C. Perry's black ships to Japan on July 8, 1853. Perry's objective was to incite Japan, through force if necessary, to open its borders to trade with the United States of America. In reaction to the arrival of those black ships which would end a 220 years isolationist policy, the country was divided. The pro-imperialist Ishin Shishi (nationalist patriots) fought to return political power to the Emperor of Japan, while the shogunate forces, including the elite Shinsengumi (newly selected corps) swordsmen, fought for the Tokugawa shogunate to keep its position.
The turning point of the Bakumatsu was the defeat of the pro-shogunate forces during the Boshin War, specifically at the Battle of Toba-Fushimi.