In ancient times the islands formed an independent kingdom. Chinese and Japanese sovereignty were successively forced on the archipelago from the 14th to the 19th century, and in 1879 the Ryukyus became an integral part of Japan. After the defeat of Japan (1945) in World War II, the United States took control of the islands.