<P> The first mention of the word Ryukyu was written in the Book of Sui . Okinawa was the Japanese word identifying the islands, first seen in the biography of Jianzhen, written in 779 . Agricultural societies begun in the 8th century slowly developed until the 12th century . Since the islands are located at the eastern perimeter of the East China Sea relatively close to Japan, China and South - East Asia, the Ryukyu Kingdom became a prosperous trading nation . Also during this period, many Gusukus, similar to castles, were constructed . The Ryukyu Kingdom entered into the Imperial Chinese tributary system under the Ming dynasty beginning in the 15th century, which established economic relations between the two nations . </P> <P> In 1609, the Shimazu clan, which controlled the region that is now Kagoshima Prefecture, invaded the Ryukyu Kingdom . The Ryukyu Kingdom was obliged to agree to form a suzerain - vassal relationship with the Satsuma and the Tokugawa shogunate, while maintaining its previous role within the Chinese tributary system; Ryukyuan sovereignty was maintained since complete annexation would have created a conflict with China . The Satsuma clan earned considerable profits from trade with China during a period in which foreign trade was heavily restricted by the shogunate . </P> <P> Although Satsuma maintained strong influence over the islands, the Ryukyu Kingdom maintained a considerable degree of domestic political freedom for over two hundred years . Four years after the 1868 Meiji Restoration, the Japanese government, through military incursions, officially annexed the kingdom and renamed it Ryukyu han . At the time, the Qing Empire asserted a nominal suzerainty over the islands of the Ryukyu Kingdom, since the Ryūkyū Kingdom was also a member state of the Chinese tributary system . Ryukyu han became Okinawa Prefecture of Japan in 1879, even though all other hans had become prefectures of Japan in 1872 . In 1912, Okinawans first obtained the right to vote for representatives to the National Diet (国会) which had been established in 1890 . </P> <P> Near the end of World War II, in 1945, the US Army and Marine Corps invaded Okinawa with 185,000 troops . A third of the civilian population died; a quarter of the civilian population died during the 1945 Battle of Okinawa alone . The dead, of all nationalities, are commemorated at the Cornerstone of Peace . After the end of World War II, the Ryukyu independence movement developed, while Okinawa was under United States Military Government of the Ryukyu Islands administration for 27 years . During this "trusteeship rule", the United States established numerous military bases on the Ryukyu islands . </P>

When did okinawa become a part of japan