Japan modernized after Matthew Perry demanded it open trade. This led to unrest and the Meiji Restoration, which established a modern government and industrialized economy. Japan then used its new military and economic strength to defeat China and Russia, gaining control over Korea and territory in Manchuria.