When Commodore Perry forced Japan to trade with the west the power of the Shogunate was broken. The Samurai became obsolete and lost their power and prestige. The Emperor became the most powerful figure in Japanese society and government replacing the Shogun. Despite efforts at fiscal reform, mounting opposition seriously weakened the Tokugawa shogunate from the mid-18th to the mid-19th century, when years of famine led to increased peasant uprisings.