TOKYO — The United States and Japan agreed Friday on a new timetable for the return to Japan of a Marine airfield and other military bases on Okinawa, moving to solve a long-festering issue that has bedeviled America’s ties with its largest Asian ally.

By agreeing to a clear timetable for the return of 2,500 acres, both nations are hoping to entice Okinawans to drop their opposition to the air base, which Washington and Tokyo want to move to another part of the island but which many Okinawans want to move off the island. Fierce local opposition has kept Japan from being able to follow through on a deal originally made in 1996 to allow the base and its noisy aircraft to be relocated to a less populated area of the island.

Japan’s hawkish new prime minister, Shinzo Abe, has been trying to revive the long-stalled deal at a time of increasing tensions with China that have led many Japanese to support strengthening the alliance with the United States, Japan’s longtime protector. The deal on Friday could help Mr. Abe politically, by making clear what Okinawans stand to gain by agreeing to keep the base.

It could also help the Obama administration if it finally leads to the end of an impasse that has left the future of the important air base in limbo, and that has undermined the Obama administration’s strategic “pivot” to Asia.