Gotō was settled in ancient times, and was a port of call on the trade route between Japan and Tang-dynasty China in the Nara period. Buddhist prelate Kūkai stopped at Gotō in 806. The islands came under the control of the Gotō clan, a local warlord clan specializing in trade and piracy, during the Muromachi period. The area was the center of intense European missionary activity in the late 16th century, which converted most of the population to the "Kirishitan" (Christian) faith. Gotō Harumasa (1548–1612) served Toyotomi Hideyoshi and participated in the Japanese invasions of Korea. During the Battle of Sekigahara he remained neutral. In 1602, after the start of the Tokugawa bakufu he pledged loyalty to "shōgun" Tokugawa Ieyasu, and in return was confirmed in his ancestral holdings, with revenues of 15,000 "koku".