The US Civil Administration of the Ryukyu Islands ended on 14 May 1972 when the prefecture was "returned" to Japan the following day. Ryukyuan postage stamps and passports had been in use, and the dollar was the currency until then. Cars continued to drive on the right till 1978.
The return of Okinawa was never a foregone conclusion because the US used the islands as a bargaining chip--first with the Chinese in November of 1943 to keep Chiang Kai-shek from concluding a peace deal with Japan and keep them in the war, then with the Japanese to prevent her from concluding a peace treaty with the USSR. The US warned Japan that if they were to do so, America might keep the Ryukyus under US control forever.
Realpolitik is hard ball.