Japanese leadership circles were filled with talk about naiyū gaikan at the beginning of the 1850s. The phrase, which means [troubles at home and dangers from abroad,] came from the ancient Chinese idea that when serious foreign and domestic troubles occur simultaneously, the dynasty is about to fall. And troubles of every sort were plaguing the ruling Tokugawa family. The bakufu administrative structures were old and creaky, leading one young upstart to say that hidebound officials acted like [wooden monkeys.] The ruling elites were laden with debts so heavy that, for some, loan interest alone consumed 90 percent of their annual income. Discontented urbanites in Osaka, angry over high taxes, famine, and poor services, had destroyed a quarter of the city during the late 1830s. And though the rebellion was put down fairly easily, the regime had not been able to quell a deluge of ensuing criticism from the political and intellectual elites. Scholars decried official inability to meet the needs of the poor. Dutch-learning scholars complained that Japan had not kept up with the West. Traditionalists lamented the movement of jobseeking peasants into the cities. Domain lords were frustrated over the costs of the alternate attendance system.
As if to underline the instability, foreign ships were showing up with increasing frequency in Japanese waters. When U.S. Commodore Matthew Perry arrived in Edo Bay in 1853 with black ships laden with nearly a hundred cannons, the Japanese concluded that the [dangers from abroad] were imminent. The Tokugawa's hold on power seemed tenuous.