The Mongol invasions of Japan in the 13th century were repelled by a combination of strategic planning and a typhoon that destroyed the invading fleet.
During the Edo period, which lasted from the 17th to the mid-19th century, Japan was ruled by the Tokugawa shogunate and experienced a period of peace and stability.
The Meiji Restoration in the late 19th century saw the overthrow of the Tokugawa shogunate and the modernization of Japan.