Jeolla and Gyeongsang, they migrated northwards to the Chungcheong and Gyeonggi areas. The History of Goryeo has a record of sea battles in 1380 whereby one hundred warships were sent to Jinpo to rout Japanese pirates there, releasing 334 captives, Japanese sorties decreasing then after. The wako pirates were effectively expelled through the use of gunpowder technology, which the wako then lacked, after Goryeo founded the Office of Gunpowder Weapons in 1377 (but abolished twelve years later). In 1419, the Korean army landed in Tsushima and started the Ōei Invasion, the largest operation against wokou ever. General Yi Jongmu's fleet of 227 ships and 17,285 soldiers set off from Geoje Island toward Tsushima on June 19, 1419. According to "Veritable Records of the Joseon Dynasty" a Korean history book, in the battle of June 20, the Korean army captured 129 wokou ships, burned 1939 houses, killed 114 people, captured 21 people, and rescued 131 Chinese who were captured by the wokou. On June 29, they burned 15 wokou ships and 68 houses, killed nine people, and rescued 15 people, including Chinese and Koreans, who had been held captive, but more than a hundred soldiers were killed by wokou. On July 3, the Korean army withdrew to Geoje Island, and finally withdrew completely after giving up the re-landing and occupation of Tsushima due to the loss of Korean army and worsening weather. In the record of July 10, the number of soldiers killed by wokou was rectified to 180. On the other hand, according to historical documents recorded by the Sō clan, the death toll of the Korean army was 2500. When the Treaty of Gyehae was concluded between the Joseon and Sō Sadamori of Tsushima in 1443 and Sō clan was given trade privileges, wokou's activities along the Korean Peninsula calmed down. Some of the coastal forts built for defense against wokou can still be found in Zhejiang and Fujian. Among them are the well-restored Pucheng Fortress (in Cangnan County, Zhejiang) and Chongwu Fortress (in Chongwu, Huai'an County, Fujian), as well as the ruins of the Liu'ao Fortress in Liu'ao, Zhangpu County (Fujian). Later wokou According to the History of Ming, 30% of the 16th century wokou were Japanese and 70% were ethnic Chinese. In attempts to centralize political control, the Ming Dynasty enacted trade bans with the consensus being that "unrestricted trade would lead to chaos". With maritime trade