By the mid- to late-1800s Asian trading routes were prized by many European and North American nations so Japan was forced to open up. After the United States threatened Japan and other countries followed suite, the shogun was removed from power as the people viewed him as a weak failure. This directly led to the establishment of the Empire of Japan (1868), which was again directly ruled by the Emperor.
Once freed of the shogun's rule and more open to the world, Japan quickly became a player on the international stage. They improved economically and technologically, gaining enough power to take many islands in the Far East, including Taiwan. They challenged and warred with both China and Russia, taking Manchuria in China and the Korean peninsula.
For decades the Japanese pushed their borders with no consequences, but by the 1930s many countries viewed their advances into China with condemnation. In 1940, one year after the outbreak of World War II (WWII), Japan joined forces with Germany and Italy, sparking tensions with much of the world, particularly the United States, who supported China at the time and was vocal about Japan's advances into that country.
In 1941 Japan attacked the United States, the American-held Philippines, and British-held Hong Kong among other places. After these surprise attacks and a quick sweep over much of the Far East, the Japanese fell back as their production, supplies, and army could not keep pace with the expanding American and British military spending and high output levels. The war for Japan ended with tragedy as the United States dropped two atomic bombs on the country; first on Hiroshima and days later on Nagasaki.
Since WWII, Japan has focused on opening up diplomatic relations and economic advancements as they were demilitarized. Ironically, the United States has become one of Japan's closest trading partners and today Japan is an economic and political world leader.