was the isolationist foreign policy of the Japanese Tokugawa shogunate under which, for a period of 265 years during the Edo period (from 1603 to 1868), relations and trade between Japan and other countries were severely limited, and nearly all foreign nationals were banned from entering Japan, while common Japanese people were kept from leaving the country. The policy was enacted by the shogunate government (or ) under Tokugawa Iemitsu through a number of edicts and policies from 1633 to 1639, and ended after 1853 when the Perry Expedition commanded by Matthew C. Perry forced the opening of Japan to American (and, by extension, Western) trade through a series of treaties, called the Convention of Kanagawa. It was preceded by a period of largely unrestricted trade and widespread piracy. Japanese mariners and merchants traveled Asia, sometimes forming communities in certain cities, while official embassies and envoys visited Asian states, New Spain (known as Mexico since the early 19th century), and Europe. This period was also noted for a large number of foreign traders and pirates who were resident in Japan and active in Japanese waters. The term originates from the manuscript work written by Japanese astronomer and translator Shizuki Tadao in 1801. Shizuki invented the word while translating the works of the 17th-century German traveller Engelbert Kaempfer concerning Japan. Japan was not completely isolated under the policy. was a system in which strict regulations were placed on commerce and foreign relations by the shogunate and certain feudal domains (). There was extensive trade with China through the port of Nagasaki, in the far west of Japan, with a residential area for the Chinese. The policy stated that the only European influence permitted was the Dutch factory at Dejima in Nagasaki. Western scientific, technical and medical innovations flowed into Japan through ("Dutch learning"). Trade with Korea was limited to the Tsushima Domain (today part of Nagasaki Prefecture) and the wakan in Choryang (part of present-day Busan). There were also diplomatic exchanges done through the Joseon Tongsinsa from Korea. Trade with the Ainu people was limited to the Matsumae Domain in Hokkaidō, and trade with the Ryūkyū Kingdom took place in Satsuma Domain (present-day Kagoshima Prefecture). Apart from these direct commercial contacts in peripheral provinces, trading countries sent regular missions to the in Edo and at Osaka Castle. China under the Ming and Qing dynasties as well as Joseon had implemented isolationist