Located far from the centers of civilization, the unification of Okinawa began very lately like any other small islands on Pacific Ocean. Even if Japan proper had been unified between the 4th and the 5th century, the social unit of Okinawa archipelagos had hardly surpassed that of a small island or of a village and remained isolated from large political movement of Japan and China.
This long sleep of Okinawa ended around the 12th century when local seigniors, called "Aji", began to fight one against another by building "Gusuku", a kind of fortress in blocks of stone. Around the 14th century, it remains only 3 seigniors on Okinawa island (Sanzan jidai or period of 3 Kingdoms) and finally in 1429 Okinawa was unified by Sho dynasty which had controlled the central part of the island before.
This small kingdom of Okinawa had been a very prosperous country: not only the archipelagos was on the route of exchange between Japan or North China with the south eastern Asia but also exported a great quantity of sulfur that Chinese needed to make explosive.
But this Okinawa's prosperity didn't last long because from the 16th century, the westerners began to appear in the region on the great ships, full of products more interesting such as guns and canons.
Become harden with a long civil war and a Korean campaign, Okinawa was an easy prey for Japanese samurais. In fact, Okinawa was invaded in 1609 by the musketeers of seignior Shimazu coming from the south Kyushu and surrendered after only 3 days of combat.
But instead of breaking up Okinawa Kingdom, Shimaza preferred to keep it under its protectorate in order not to offend China, because officially Okinawa had been her vassal state. The period spanning from the 12th century to 1609 is called "Ko Ryukyu" i.e. "Ancient Okinawa".
Though this Shimazu's occupation had taken away a part of its freedom, it brought a better organization on social life and suppressed old-fashioned habits like sorcery and superstitions. The famous reformer of Okinawa, Haneji Choshu, recommended a sober life style while to cultivate the people via education in order to compete with the occupants of Shimazu.
During Tokugawa reign, Japan had been completely closed to foreign visitors, excepting for Dutch, Chinese and Koreans, i.e. "Sakoku" or "National seclusion policy". In order to modify this politics, Americans sent 4 warships to Japan under the commandment of Commodore Perry in 1853, because they were looking for a commercial outlet and a naval base for their whalers.
Before going to Japan, Perry called at Okinawa with a plan to annex, it if Japan should refuse his demand to open her harbors. But Japan gave up before a threat of canons pointed to Tokyo and accepted to open 4 harbors (Kanagawa's Treaty). She signed then a similar treaty with other world powers of that period, Great Britain, France and Russia.
This visible weakness of Tokugawa regime had destabilized whole of Japanese feudal system and after a civil war not only between pro and anti Tokugawa, but also pro and anti opening of Japan, the Tokugawa family gave up all the fiefdoms in 1868 ("Taisei hokan" or "Restoration of imperial regime").
But this movement didn't stop shortly. One after another all the Japanese seigniors gave up their fiefdoms and Okinawa Kingdom was suppressed in 1879, too ("Ryukyu shobun" or "Settlement of Okinawa"). The period which spans from Shimazu's invasion in 1609 until this date when Okinawa was half independent is called "Late Okinawa".
Since the local habits were quite different from those of Japan proper, the central government tried to preserve them (law called "Kyushuonzon" or "conservation of ancient custom), but this policy has put back the modernization of Okinawa, for it favored too much old leaders.
Since 1920, Okinawa had been governed exactly as in other Japanese prefectures but its inhabitants remained poor and many preferred immigrating elsewhere, especially to Mariana islands which Japan had inheritated from defeated Germany in 1917. But the real ordeal of Okinawa arrived only from the end of the World War II.
Being afraid that Okinawa should be soon a battle field, the Japanese general staff began to organize an evacuation of noncombatant civilian population from 1944. But this decision arrived too late, for the surrounded sea had been already infested with American submarines. In fact, on August 21, 1944, Tsushimamaru which was carrying 1700 passengers, among them 800 school children from Okinawa, was sunk by an American submarine, off Kyushu coast and made more than 1500 victims.
Contrary to all expectations (Japanese had imagined a landing to Taiwan), Americans landed on March 26, 1945, on the tiny islands of Kerama, situated near the main island of Okinawa, in order to create a logistic base. Scarcely guarded, the islanders surrendered quickly. A few days later, the first April, Americans landed on Kadena beach of Okinawa island, in order to isolate the southern part where the most of population and the army troop were concentrated.
Having no supply lines, in spite of a fierce fight with the famous suicidal pilots, "Kaimkaze", Japanese defenders retreated gradually to the southern limit of the island and the organized resistance ended on June 23 with the suicide of the chief commander, General Ushijima Mitsuru.
This battle of Okinawa was a real disaster for its inhabitants, for there were not only 90,000 dead among Japanese soldiers but also 150,000 civilian dead (one quarter of the total population), besides innumerable historic buildings and cultural centers reduced to ashes like Shuri Castle.