From the 15th through the early 17th century, Japanese seafarers traveled to China and Southeast Asia countries, in some cases establishing early Japantowns.[78] 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.