From the 15th through the early 17th century, Japanese seafarers traveled to China and Southeast Asia countries, in some cases establishing early Japantowns. This activity ended in the 1640s, when the Tokugawa shogunate imposed maritime restrictions which forbade Japanese from leaving the country, and from returning if they were already abroad. This policy would not be lifted for over two hundred years. Travel restrictions were eased once Japan opened diplomatic relations with Western nations. In 1867, the bakufu began issuing travel documents for overseas travel and emigration.