Since the mid-15th century, Satsuma fought with the Ryukyu Kingdom for control of the Northern Ryukyu Islands, which lie southwest of Japan. In 1609, Shimazu Iehisa requested permission from the shogunate to invade Ryukyu. After a three-month war which met stiff resistance, Satsuma captured the Ryukyuan capital of Shuri and King Shō Nei. In the ensuing peace treaty, Satsuma annexed the Amami and Tokara Islands, demanded tribute, and forced the King and his descendants to pledge loyalty to Satsuma's "daimyō".