We tend to think of samurai as noble and honorable, but urban samurai, according to Andrew Gordon's book A Modern History of Japan, were a rough-and-tumble lot. Samurai gang wars, a West Side Story, and the shadows of Edo Castle were frequent in the early 1600s. You still say that history books are boring. As with kings and lesser nobles anywhere, the central bakufu had trouble controlling the more powerful daimyo, who were able to build up their own strength because of their control over local resources. This poor control also made it really difficult to collect taxes, so the Tokugawa were already a bit on the ropes when two foreign events rocked Japan. First was China's humiliating defeat in the Opium Wars, after which Western nations forced China to give Europeans special trade privileges. It was a wake-up call to see the dominant power in the region so humbled, but even worse for the Tokugawa was the arrival of Matthew Perry.