For the Japanese, Okinawa was the last stepping stone before the invasion of the main islands of the Empire of Japan. The ferocious Battle of Okinawa lasted 82 days. Many analysts believe that Japanese military leaders, realizing the war was lost, hoped to inflict such heavy casualties on Allied forces that a negotiated peace would seem preferable to a bloody invasion of the home islands.
Instead of attacking, Japanese forces focused on defensive maneuvers that resulted in many casualties for the American invaders. Using pillboxes, caves, and ancient castles, they deployed a series of defense lines across the island which they were able to maintain for many weeks. With the addition of multiple Kamikaze air attacks, the Battle of Okinawa was one of the bloodiest and most difficult of the entire Pacific campaign. And, since the island was heavily-populated, civilian casualties soared to ~100,000 ( a level approximately the same as the Japanese army).
Although the island was declared “secure” by American forces on June 21, 1945, many Japanese troops continued fighting. During “mop-up” operations, 8,975 Japanese soldiers were killed.