From 1616 until the arival of Commodore Perry, the Tokugawa Shogunate ordered the closure of all of Japan to foreigners, with the exception of one city (IIRC Shimoneseki). Any foreigner found anywhere else in Japan was summarily put to death, no exceptions. The US confronted Japan in the 1850's...