In the sixteen thirties, the shogun had closed Japan to Western influences or influences of Europe and the United States. Only one Western ship was allowed to enter Japan each year. Japanese could not travel outside the country of Japan or they would be punished by death.
By the middle eighteen hundreds, Western nations had adopted a policy of imperialism. Imperialism is the extension of a nation's power over other lands by military, political, or economic means. It was at this time, in the eighteen fifties, that Japan was forced to open it borders.
After the sixteen thirties, almost every foreign ship that sailed to Japan for any reason was turned away. Although many ships from Europe and the United States sailed near Japan, few made contact with them.