After multiple bans that isolated Japan from the outside world, the Tokugawa shogunate was weakening. Inside the country, political unrest and administrative division were taking their toll on the Tokugawa. The breaking point though was the arrival of Commodore Matthew Perry and his fleet in 1853. By allowing Perry into Japan, the Tokugawa showed the weakening of their influence. Finding that they could no longer enforce their ban on outside contact, the Tokugawa signed a treaty in 1854, which ended Japan's isolation.
Despite the signing of the treaty, a couple of domains within Japan, namely the Choshu and Satsuma domains, tried to remain isolated, which was a direct violation of the Tokugawa's decree. Leaders of these domains were called tozama, or outside daimyo. It was then that those domains, as well as others demanded a form of government that could effectively dispose of the unwanted foreigners. Their "slogan" was: "sonno joi", or "revive the emperor, expel the barbarians." To dispel the growing unrest within the country, the Tokugawa began to import Western technology and weapons.
After years of organization and planning, in 1868 the tozama staged a palace coup, expelled the Tokugawa from power, and granted power to Emperor Meiji. With the reinstatement of an emperor, the capital was moved from Kyoto to Edo, which was renamed Tokyo. In addition to that, Japan underwent administrative, economic, social, legal, educational, and military reforms. These reforms were instated to improve the society and economy. The new slogan for Japan at this time was: "fukoku Kyohei", or "enrich the country and strengthen the military."
There was an additional reaction to the Meiji Restoration that was felt throughout Japan. Japan began to embrace the teachings of the West, with the hopes of becoming a world power. Many Japanese traveled to Europe to learn about current technology, that they might take back with them to Japan. This outside education proved useful throughout the Sino-Japanese War (1895), and the Russo-Japanese War (1904-1905), from which Japan emerged victorious. After those wars, Japan was considered to be equal with other powers of the time.