region of Korean Peninsula and Korea-Japan relations deteriorated. During the middle Kamakura period, Japan suffered from the invasions of the Mongol Empire (Yuan dynasty), which was then dominant on the continent, and its partner kingdom, the Goryeo of Korea. The History of Yuan states that the Mongol invasions of Japan began with King Chungnyeol of Goryeo "persistently recommending an expedition to the east to Yuan's emperor in order to force Japan to become its vassal state." In order to invade Japan, the Mongols ordered the Korean king to manufacture 1,000 warships. The two Mongol – Korean fleets were destroyed by storms, giving rise to the myth of the Kamikaze, the divine winds that protected Japan. Additionally, the Japanese saying, "The Mongol ("Mukuri") and Goguryeo ("Kokuri") demons are coming! (むくりこくり)" has its origins back during the time of the Mongol Invasions of Japan. Kokuri is the name of Goguryeo in Japanese and was used as a reference towards Goryeo soldiers that accompanied the Mongols during the invasions. Early modern period (16th – 18th centuries) During the Muromachi and Sengoku periods in Japan, pirates sailing from Kyushu attacked ships along the coasts of Korea and China and were feared as Japanese pirates (called "wako" in Japanese). Beginning in the 15th century, feudal lords from Tsushima established three treaty ports on Korea's southern coast, which were then known as waegwan (Japan houses), as enclaves for Japanese envoys and merchants to freely trade at. Imjin War (1592–1598) Toyotomi Hideyoshi, who had unified Japan, ordered daimyōs (feudal lords) all over the nation to the conquest of Ming Dynasty China by way of Korea, after the latter's refusal to allow Japanese forces to march through, while King Seonjo alerted its Chinese counterpart regarding the Japanese threat. Japan completed the occupation of the Korean peninsula in three months. The Korean king Seonjo first relocated to Pyongyang, then Uiju. In 1593, The Ming Chinese emperor intervened by sending his army and recaptured the Korean peninsula. However, the Japanese military were able to gather in Seoul and successfully counterattacked China. Although during the war Korean land forces lost most of their land battles (with only a handful of notable exceptions), the Korean Navy won almost all the naval battles with decisive defeats of the Japanese fleet by Admiral Yi Sun-sin, cutting off Japanese supply lines and helping to stall the invading forces on the Korean peninsula. Amid the stagnation