In 1603, after decades of civil warfare, the Tokugawa shogunate (a military-led, dynastic government) ushered in a long period of relative political stability and isolation from foreign influence.
For more than two centuries this policy enabled Japan to enjoy a flowering of its indigenous culture.
Japan opened its ports after signing the Treaty of Kanagawa with the US in 1854 and began to intensively modernize and industrialize.
It occupied Korea, Formosa (Taiwan), and southern Sakhalin Island. In 1931-32 Japan occupied Manchuria, and in 1937 it launched a full-scale invasion of China.
Japan attacked US forces in 1941 — triggering America's entry into World War II — and soon occupied much of East and Southeast Asia.
After its defeat in World War II, Japan recovered to become an economic power and an ally of the US. While the emperor retains his throne as a symbol of national unity, elected politicians hold actual decision-making power.
Following three decades of unprecedented growth, Japan's economy experienced a major slowdown starting in the 1990s, but the country remains a major economic power.
In March 2011, Japan's strongest-ever earthquake, and an accompanying tsunami, devastated the northeast part of Honshu island, killing thousands and damaging several nuclear power plants.
The catastrophe hobbled the country's economy and its energy infrastructure, and tested its ability to deal with humanitarian disasters.