In 1609, the Japanese domain of Satsuma launched an invasion of the Ryukyu Kingdom, ultimately capturing the king and his capital after a long struggle. Ryukyu was forced to cede the Amami Islands and become a vassal of Satsuma. The kingdom became both a tributary of China and a tributary of Japan. Because China would not make a formal trade agreement unless a country was a tributary state, the kingdom was a convenient loophole for Japanese trade with China. When Japan officially closed off trade with European nations except the Dutch, Nagasaki, Tsushima, and Kagoshima became the only Japanese trading ports offering connections with the outside world.