Although the origin of the first people in Okinawa as well as when they first came is disputed, it is generally agreed upon that the earliest traces of human inhabitation in Okinawa and the adjacent islands dates back 32,000 years ago. The early history of Okinawa was somewhat similar to that of Japan with comparable features such as the use of shell middens. However, Okinawans were mostly hunter-gatherers and their society was more analogous to that of China.
The first written records of Okinawan history describe the history of Okinawa in the 12th Century. It is known that the Shuten Dynasty ruled Okinawa for three generations and that this was followed by a period of rule by the Eiso Dynasty for five generations. During this time, fortresses known as Gusukuwere built to defend Okinawa from invasion. However, foreign visitors to Okinawa during this time (Chinese, Portuguese, British etc.) always noted the great hospitality of the natives.
In the 14th Century, Okinawa was divided between three kingdoms, similar to how China was in an earlier period. In 1429, the Okinawan king Shou Hashi unified the three kingdoms of Okinawa along with most of the surrounding islands such as Yonaguni, Yaeyama, and the Amami Islands and subsequently established the Ryuukyuu Kingdom. The kingdom was a prosperous trading nation and enjoyed cordial relations with the Ming Dynasty of China (and later the Manchu-ruled Qing Dynasty) from which it received support in development.
In 1609, the kingdom was invaded by the Shimazu clan of Satsuma and forced to become its vassal state. During the invasion, the Satsuma forces looted many cultural artifacts and forcefully annexed the Amami Islands. The Okinawans didn't put up a fight due to their philosophy of nuchidu takara,which stipulated that life was precious. The Shimazu banned the possession of swords by the native population and this led to the development of the Okinawan martial art Karate. Okinawa served as Japan's only opening to the outside world when Japan declared Sakoku.
In 1872, Okinawa was declared a domain, or han, of Satsuma. In 1879, Okinawa was annexed by Meiji Japan as Okinawa Prefecture (consequently, some Ryuukyuuan nobles resisted the annexation and a few fled to the Manchu Empire as refugees). In the years leading up to World War II, the Japanese government embarked on a campaign of forced assimilation and brainwashing through propaganda. Okinawan culture and Ryuukyuuan languages were suppressed during this time through draconian methods such as the use of the use of the hougen fuda, or dialect card which was a form of punishment implemented in schools where children who were caught speaking Okinawan or other Ryuukyuuan languages were given a card and beaten by teachers at the end of the day (this is very similar to the Welsh Not and La Vergonha—the respective methods used by the British to suppress Welsh and the French to suppress Occitan, Basque, Catalan, and Breton).
During World War II, Okinawa was the site of one of the last major battles of World War II, and was the only part of Japan that served as a battlefield (apart from Southern Sakhalin and the Kuriles). A total of about 150,000 soldiers from both sides died along with more than one third of the civilian population (300,000 people). Although the Americans expected the Okinawans to welcome them as liberators, brainwashing by the Imperial Japanese authorities led to fierce resistance by Japanese and Okinawan soldiers and civilians alike. Native Okinawans were told that American forces would rape them before torturing them to death and this led to mass suicides. Although there were isolated incidents of this actually happening, US forces overall did not engage in atrocities and it was actually the Japanese forces who went on a rampage against the native Okinawans (one incident involves a mass rape of Okinawan women being committed by Japanese soldiers with the intent of "making sure they give birth to Japanese babies instead of American mongrels"). As a result of the battle, 90% of the buildings on the island were destroyed, along with countless historical documents, artifacts, and cultural treasures, and the tropical landscape was turned into "a vast field of mud, lead, decay and maggots." After the war, American forces occupied Okinawa until 1972. This led to a rise in Okinawan Nationalism.
Immediately after the war, there were calls for independence among many Okinawans and there was pressure in 1945 for the creation of a fully independent Ryuukyuuan state. Unfortunately for the people of Okinawa, Ryuukyuuan independence was not realized and the area of Okinawa Prefecture was returned to Japan in 1972 as stipulated by the Okinawa Reversion Agreement. Although it appears that most Okinawans supported being reincorporated into Japan (likely for economic reasons), the Ryuukyuu Independence Movement became more vocal after Okinawa was reannexed. Many American troops in Okinawa learned Karatefrom native Okinawans during the American occupation and this led to Karate becoming well-known worldwide when these troops brought it back to the US (albeit as a Japanese martial art).
Nowadays, Okinawa is Japan's poorest prefecture and the only one that doesn't have a train system. The Ryuukyuuan languages spoken in the prefecture are presently only spoken widely by the older generation (although there are calls by the prefectural government to preserve and revive the languages, especially Okinawan). In recent times, the people of Okinawa have become fed up with the presence of US military bases on the basis of noise pollution, occasional atrocities committed by American soldiers (such as the 1994 Okinawa Rape Incident), and the threat of planes crashing (as in the case of the 1959 Okinawa F-100 Crash). There is also a small but noticeable Okinawan independence movement spearheaded by the Kariyushi Club which seeks to reestablish Ryuukyuuan independence, revive the Ryuukyuuan languages, remove the presence of US military bases, and protect Okinawan and Ryuukyuuan culture. Many Okinawans and other Ryuukyuuan peoples see themselves as a separate, ethnically different nation with a unique and separate cultural heritage from the mainland Yamato Japanese. Furthermore, many Okinawans feel looked down upon by the "mainland" Japanese (who pejoratively refer to Okinawan and other Ryuukyuuan languages as Hougen—dialects—instead of proper languages), and feel a strong connection to Ryuukyuuan traditional culture and the pre-1609 history of independence. The Meiji government's assimilation policies and ideological agenda which led to the near extinction of Okinawan and other Ryuukyuuan languages and culture are seen in a very negative light by many Okinawans.