The oldest evidence of human existence in the Ryukyu islands was discovered in Naha and Yaese. Some human bone fragments from the Paleolithic era were unearthed, but there is no clear evidence of Paleolithic remains. Japanese Jomon influences are dominant in the Okinawa Islands, although clay vessels in the Sakishima Islands have a commonality with those in Taiwan.
The first mention of the word Ryukyu was written in the Book of Sui. This Ryukyu might refer to Taiwan, not the Ryukyu islands. Okinawa was the Japanese word depicting 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 in the center 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 had a tributary relationship with the Chinese Empire beginning in the 15th century.
In 1609 the Satsuma clan, which controlled the region that is now Kagoshima Prefecture, invaded the Ryukyu Kingdom. Following the invasion the Ryukyu Kingdom surrendered to the Satsuma and was forced to form a tributary relationship with Satsuma and the Tokugawa shogunate, in addition to its previous relationship with China. Ryukyuan sovereignty was maintained since complete annexation would create a problem with China. The Satsuma clan earned considerable profits from trades with China during a period in which foreign trade was heavily restricted by the shogunate.
Though 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 Dynasty of China asserted sovereignty over the islands of the Ryukyu Kingdom, since the Ryukyu Kingdom was also a tributary nation of China. Ryukyu han became Okinawa Prefecture of Japan in 1879, even though all other hans had become prefectures of Japan in 1872.
Following the Battle of Okinawa and the end of World War II in 1945, Okinawa was under United States administration for 27 years. During the trusteeship rule the USAF established numerous military bases on the Ryukyu islands.
In 1972, the U.S. government returned the islands to Japanese administration. Under the Treaty of Mutual Cooperation and Security, the United States Forces Japan (USFJ) have maintained a large military presence. 27,000 personnel, including 15,000 Marines, contingents from the Navy, Army and Air Force, and their 22,000 family members are stationed in Okinawa. 18% of the main island was occupied by U.S. military bases and 75% of all USFJ bases are located in Okinawa prefecture.
Accidents and crimes committed by U.S. servicemen have reduced local citizens' support for the U.S. military bases. The Japanese and the US government consider the mutual security treaty and the USFJ absolutely necessary. The rape of a 12 year old girl by U.S. servicemen in 1995 triggered large protests in Okinawa. As a result, both the U.S. and Japanese governments agreed to the relocation of the Marine Corps Air Station Futenma and other minor bases. However, at present, the closure of the bases has been indefinitely postponed. These disagreements also contribute to the relatively recent anti-Japanese sentiment and ensuing Ryukyu independence movement.