The ancestry of the modern-day Ryukyuan people is disputed. One theory claims that the earliest inhabitants of these islands crossed a prehistoric land bridge from modern-day China, with later additions of Austronesians, Micronesians, and Japanese merging into the population. Another theory, based mostly on evidence from studies of physical anthropology and genetic research, proposes that the modern Ryukyuans and people of Southern Kyūshū are more closely related to the prehistoric inhabitants of the Japanese islands. This population is known in Japan as Jōmon-jin (縄文人) or "People of the Jōmon Era". The scientists who have developed this theory explain that the mainland Japanese are rather a complex mix of prehistoric Japanese aborigines and immigrants who originated in the ancestral populations of various continental Asian peoples, especially those who came from what are now Korea and China.
Early Chinese visitors noted the hospitality of the islanders, as well as the sharp economic divisions between the small upper class and the impoverished masses. Along with the arrival of European explorers in the nineteenth century, the Ryukyuans also came into contact with the Dutch, the Portuguese, the English and others, who always noted the hospitality of the natives.
In the fifteenth and sixteenth centuries, the Ryukyuans traded from Java to Japan, as well as with China and Korea. This led to an increased level of prosperity for the kingdom.
The Three Kingdoms period, also known as the Sanzan period (三山時代 Sanzan-jidai ), lasted from 1322 until 1429 and saw a gradual consolidation of power, culminating in the unification of the Ryūkyū Kingdom.
In 1429, King Hashi completed the unification of the three kingdoms and founded one Ryūkyū Kingdom with its capital at Shuri Castle.
Near the end of the sixteenth century, Japanese feudal leader Toyotomi Hideyoshi ordered the Ryūkyū kingdom to support Hideyoshi’s invasions of Korea with men and arms. However, the kingdom was already a tribute state of China. The kingdom’s policy was to not participate in military efforts against China, and they certainly did not wish to risk losing their Chinese trade. The Japanese proceeded with their attack on the Korean peninsula without the aid of the Ryūkyū kingdom. During this same period a ferocious battle of succession arose in the Ryūkyū kingdom due to the death of Hideyoshi. The Shimazu clan of Satsuma, the nearest Japanese neighbors of the kingdom, were the victors.
The Shimazu clan not only wanted its share of the Ryūkyūan trade with mainland Japan and Southeast Asia, but also to gain favor with the regime in Edo (modern-day Tokyo). The kingdom had not paid respects to the new regime; therefore, permission was granted by the rulers in Edo to invade the kingdom.
The invasion of the Ryūkyūs by Satsuma took place in 1609. Three thousand men and more than one hundred war junks sailed from Kagoshima at the southern tip of Kyūshū. The Ryūkyūans did not put up a fight, due to the order of the king, who told them “nuchidu takara” (Life itself is a treasure). Many priceless cultural treasures were looted and taken to Kagoshima.
The kingdom became a tribute state of both China and the Satsuma clan, with Satsuma exercising ultimate control. Because China would not make a formal trade agreement unless a country was a tribute state, the kingdom was a convenient loop-hole for Japanese trade with China. When Japan officially closed off trade with European nations except the Dutch, Nagasaki and Ryūkyū became the only Japanese trading ports offering connections with the outside world.
The Shimazu introduced the policy of banning sword ownership by commoners, which was already well established on the mainland. This lead to the development of the indigenous martial art karate, which utilizes domestic items as weapons.
Perry’s “black ships”, official envoys from the United States, came in 1853. The Ryūkyū kingdom was formally annexed to Japan as Ryukyu han in 1872. In 1879, Ryukyu han was renamed Okinawa Prefecture by the Meiji government and the monarchy in Shuri was abolished.
Hostility against mainland Japan increased in the Ryūkyūs immediately after its annexation to Japan. Japan introduced modern institutions, based on Western models, including public education using standard Japanese. This increased the number of Japanese language speakers on the islands, creating a link with the mainland. When Japan became the dominant power of the Far East, many Ryūkyūans were proud of being citizens of the Empire. However, there was always an undercurrent of dissatisfaction for being treated as a second class citizens. For example, during an earlier part of the Meiji era, Japan offered the Ryūkyū islands to the Qing Dynasty in exchange for treaty concessions, though the negotiation eventually failed.
An article in the 1878 edition of the 'Globe Encyclopaedia of Universal Information' described the islands, also known as Loo-Choo, Lu-Tchu and Lieu-Baeu, thus:
In the years leading up to World War II, the Japanese government sought to reinforce national solidarity in the interests of militarization. They did so by means of conscription, mobilization, and nationalistic propaganda. People of the Ryukyu Islands, having spent only a generation as full Japanese citizens, were interested in proving their value to the nation in spite of prejudice expressed by mainland Japanese people, the mainland Japanese politicians appointed to govern Okinawa, and the mainland Japanese generals commanding Okinawa military units. 
The Japanese government also promoted Japanese-language education in the school system to render the islanders Japanese citizens.
After the beginning of World War II, the Japanese military conscripted school girls (15 to 16 years old) to join a group known as the Princess Lilies (Hime-yuri) and go to the battle front as nurses. There were seven girls' high schools in Okinawa at the time of World War II. The Princess Lilies were organized at two of them, and a total of 297 students and teachers eventually joined the group. Two hundred and eleven died. Most of the girls were put into temporary clinics in caves to take care of injured soldiers. With a severe shortage of food, water and medicine, many of the young girls died while trying to get care for the wounded soldiers.
The Japanese military had told these girls that if they were taken prisoner the enemy would rape and then kill them, and then gave the girls hand grenades to commit suicide with rather than being taken prisoner. One of the Princess Lilies explained this by saying, "We had a strict imperial education, so being taken prisoner was the same a being a traitor. We were taught to prefer suicide to becoming a captive." Many students died saying "Tenno Heika Banzai", which means "Long live the Emperor."
The board of education, made up entirely of mainland Japanese, required the girls' participation. Teachers who opposed to the board of education, insisting the students be evacuated to somewhere safe, were accused of being traitors.
The Battle of Okinawa was one of the last major battles of World War II, claiming the lives of an estimated 120,000 combatants. The Ryukyus were the only inhabited part of Japan to experience a land battle during World War II. In addition to the Japanese military personnel who died in the Battle for Okinawa, more than one third of the civilian population, 300,000 people, were killed, and many important documents, artifacts, and sites related to Ryukyuan history and culture were destroyed, including the royal Shuri Castle. Americans had expected the Okinawan people to welcome them as liberators but the Japanese had used propaganda to make the Okinawans fearful of Americans. As a result, some Okinawans joined militias and fought along Japanese. This was a major cause of the civilian casualties, as America could not distinguish between combatants and civilian.
Due to fears concerning their fate during and after the invasion, the Okinawan people hid in caves and in family tombs. Several mass deaths occurred, such as in the "Cave of the Virgins", where many Okinawan school girls committed suicide by jumping off cliffs for fear of rape. Similarly, whole families committed suicide or were killed by near relatives in order to avoid suffering what they believed would be a worse fate at the hands of American forces; for instance, on Zamami Island at Zamami Village, almost everyone living on the island committed suicide two days after Americans landed. Although the Americans had made plans to safeguard the Okinawans, their fears were not entirely unfounded, as killing of civilians and destruction of civilian property did take place; for example, on Aguni Island, 90 residents were killed and 150 houses were destroyed.
As the fighting intensified, Japanese soldiers hid in caves with civilians, which further increased civilian casualties. Additionally, Japanese soldiers shot Okinawans who attempted to surrender to Allied Forces. America utilized Nissei Okinawans in psychological warfare, broadcasting in Okinawan, which led to the Japanese belief that Okinawans that did not speak Japanese were spies or disloyal to Japan, or both. These people were often killed as a result. As the food become scarce, some civilians were killed over small amounts of food. "At midnight, soldiers would wake up Okinawans and take them to the beach. Then they chose Okinawans at random and threw hand grenades at them."
Massive casualties in the Yaeyama Islands caused the Japanese military to force people to evacuate from their towns to the mountains, even though malaria was prevalent there. Fifty-four percent of the island's population died due to starvation and disease. Later, islanders unsuccessfully sued the Japanese government. Many military historians believe that Okinawa led directly to American use of the atomic bomb on Hiroshima and Nagasaki. A prominent holder of this view is Victor Davis Hanson, who states it explicitly in his book Ripples of Battle. The theory goes: "because the Japanese on Okinawa, including native Okinawans, were so fierce in their defense (even when cut off, and without supplies), and because casualties were so appalling, many American strategists looked for an alternative means to subdue mainland Japan, other than a direct invasion."
After the war, the islands were occupied by the United States and run by a U.S. military government even after the end of the occupation of Japan as a whole in 1952. The United States dollar was the official currency used, and cars drove on the right, American-style, as opposed to on the left as in Japan. (The islands switched to driving on the left in 1978, six years after they were returned to Japanese control.)
The U.S. used their time as occupiers to build large army, air force, navy, and marine bases on Okinawa.
On November 21, 1969 U.S. President Richard Nixon and Japanese Prime Minister Eisaku Sato agreed in Washington, D.C. that Japan could purchase the islands on June 17, 1971. The U.S. ceded the islands to Japan on May 15, 1972, setting back a Ryūkyū independence movement that had emerged. Under terms of the agreement, the U.S. retained its rights to bases on the island as part of the 1952 Treaty to protect Japan, but those bases were to be nuclear-free. The United States military still controls about 19% of the island, which makes the 30,000 American servicemen a dominant feature in island life. While the Americans provide jobs to the locals in bars and entertainment and pay rent on the land, widespread personal relationships between U.S. servicemen and Okinawan women remain controversial in Okinawan society. Okinawa remains Japan's poorest prefecture.
Some Okinawans refuse to raise the Japanese flag at official events. Because the national flag is somewhat controversial due to its perceived connection to Japanese Imperialism, many on the left of political affiliation will refuse to raise the flag. Similarly in Okinawa, those who tend to have leftist political affiliation would object to raising of the flag though some undoubtedly have additional nationalistic motives.
The American military has had a troubled history with Okinawa ever since the battle of Okinawa. During the occupation, American military personnel were exempt from domestic jurisdiction. Some American soldiers committed crimes or drove recklessly, which occasionally killed locals when they did, but were not punished in civilian courts. One notorious incident involved an American soldier hunting a local man for fun. Okinawans clearly resented being occupied after the war. A sentiment in Okinawa was already moving toward reverting to Japan and the movement to restore Okinawa to Japan's control rose in the 1960s, inspired in part by the crash of a United States Air Force fighter jet into an elementary school that killed 11 students and six residents of the nearby neighborhood on June 30, 1959. On December 20, 1970, a car accident involving members of the U.S. military and a local man in Koza (Okinawa City) led to an unprecedented riot, which is known as the Koza Riot. Okinawans started to demonstrate in mass to demand reunification with Japan and the growing antibase movement spurred Japan and the U.S. to negotiate on the issue. Okinawan people hoped to remove American military from Okinawa. However, after Okinawa was reunited in 1972, Japan immediately signed a treaty with the U.S. so that the American military could stay in Okinawa.
The legal problem remained the same. Whenever American military personnel committed a crime against an Okinawan, the perpetrator could claim SOFA (Status of Forces Agreement) status, which automatically put him beyond the reach of Japanese law enforcement. They included homicides, rapes and burglaries. The number of U.S. soldier-caused traffic accidents was over 3,000 a year. All the crimes were handled by MPs who concealed evidence.The accused were tried by closed military courts and declared either innocent or given minor punishments. After the end of Cold War, the situation changed somewhat.
In 1995, two Marines and a sailor kidnapped and raped a 12-year-old girl and left her for dead, and under the SOFA with the U.S., local police and prosecutors were unable to get access to the troops until they were able to prepare an indictment. What surprised many in this instance was not just the nature of crime but also that, in this instance, the suspects were handed over to Japanese police.
Other complaints are that the military bases disrupt the lives of the Okinawan people; the American military occupy more than a fifth of the main island. The biggest and most active air force base in east Asia, Kadena Air Base, is based on the island; the islanders complain the base produces large amounts of noise and is dangerous in other ways. In 1959 a jet fighter crashed into a school on the island, killing 17 children and injuring 121. In 2004, a U.S. military helicopter crashed into a college on the island, injuring the three crew members on board. The U.S. military prevented the local police from participating in the investigation of the crash.
While the bases do provide revenue it is claimed that they are holding the island's development back. Base-related revenue makes up 5% of the total economy. If the U.S. vacated the land, it is claimed that the island would be able to generate more money from tourism by the increased land available for development. In the 1990s, a Special Actions Committee was set up to prepare measures to ease tensions, most notably the return of approximately 50 km² to the Japanese state.
On February, 2008, a U.S. Marine was arrested for allegedly raping a 14-year-old Japanese girl in Okinawa, and a member of the U.S. Army was suspected on raping a Filipino woman in Okinawa. U.S. Ambassador Thomas Schieffer flew to Okinawa and met with Okinawa governor Hirokazu Nakaima to express U.S. concern over the case and offer cooperation in the investigation. U.S. Forces Japan designated February 22 as a Day of Reflectio for all U.S. military facilities in Japan, setting up a Sexual Assault Prevention and Response Task Force in an effort to prevent similar incidents.