The foreign relations policy of Japan in which strict regulations were applied to commerce and foreign relations by the shogunate; the policy stated that, with the exception of certain circumstances, no foreigner could enter nor could any Japanese citizen leave the country on penalty of death; the policy was enacted by the Tokugawa shogunate from 1633–39 and remained in effect until 1853, with the arrival of the Black Ships of Commodore Matthew Perry and the forcible opening of Japan to Western trade.