around 1408. Although it struggled to keep its territory in Chikuzen on Kyūshū, the clan was finally purged from that region by the Ōuchi clan in the mid-15th century. From roughly the 1430s to the 1550s, the clan worked towards independence, its sights set on gaining true control of Tsushima, and on establishing friendly relations with Joseon Dynasty Korea. The first of these goals was attained through a reversal of fate in which the Shōni came to rely upon the Sō for military aid against the Ōuchi. Sō Sadamori and his younger brother Sō Morikuni helped to defeat the Ōuchi over ten times, and in doing so deepened their clan's relationship with the traders and merchants of Hakata, one of Kyūshū's major ports. Being based on the mountainous island, the Sō clan heavily relied on trade with Korea. Fortunately, the Sō clan shared mutual interests with the Joseon Dynasty. In 1443, the Daimyō of Tsushima, Sō Sadamori proposed a Gyehae treaty. The number of trade ships from Tsushima to Korea was decided by this treaty, and the Sō clan monopolized the trade with Korea. The Sō were required to greatly reduce the number of pirate attacks on Korea, and in return would be granted a virtual monopoly on Japanese trade with their neighbors on the peninsula. This would later lead to the emergence of the Sō as one of the major clans in Japan, their wealth and power from trade more than making up for their small territory and submissive position vis-a-vis Korea. Alongside the Shōni clan, whose hereditary clan heads now regularly operated under Sō clan guidance, the Sō fought the Ōuchi numerous times across the Sengoku period (1467–1600), and later the Mōri and Ōtomo clans as well; the clan lost and regained their territory in Chikuzen province on Kyūshū many times over the course of the period. In the end, the downfall of the Shōni, marked by Shōni Fuyuhisa's 1559 defeat at the hands of Ryūzōji Takanobu, brought an end to the Sō clan's territorial aspirations on Kyūshū. Following a period of increased wakō predation, the Joseon-Japanese "Treaty of Tenbun" in 1547 (Tenbun 11)limited trading to the Joseon port of Pusan and also limited Sō clan commerce to 20 ships annually. The Sō clan submitted itself to Toyotomi Hideyoshi in 1587 and supplied troops for the Japanese invasions of Korea (1592-1598). Soon afterwards, however, the clan took it