Japan and the US have sealed a plan to restructure the US military presence in Japan after months of negotiations.
Okinawans have long complained about the presence of US bases
Some 8,000 US troops will be moved from the Japanese island of Okinawa, with other bases earmarked for closure.
Japan's military will take a greater role in maintaining security in the Asia-Pacific region and will receive US anti-ballistic missile technology.
The deal was agreed in October last year, but was held up amid discussions over how to pay for the changes.
It was finalised at a meeting in Washington between US Defence Secretary Donald Rumsfeld, Secretary of State Condoleezza Rice and Japan's Foreign Minister Taro Aso and the head of Japan's defence agency Fukushiro Nukaga.
They called the US-Japan relationship "the indispensable foundation of Japan's security and of peace and stability in the Asia-Pacific region and the linchpin of American security policy in the region".
The full cost of the restructuring has not been finalised but is believed to be tens of billions of dollars.
Last month Japan agreed to pay $6.1bn, or 75%, of the cost of the Okinawa move, which is central to the agreement.
Relocation of 8,000 US marines and 9,000 family members from Okinawa to Guam
Cost of this relocation: $10bn. Japan to pay $6bn
US military facilities to become shared by 2007. Possible total return of five US bases to Japanese control
US Patriot PAC-3 missiles deployed to existing facilities and areas as soon as possible
US airfield at Futenma on Okinawa to move to two runways in less-congested area
US aircraft carrier air wing at Atsugi air station near Tokyo to move by 2014 to Iwakuni
The US at present has more than 40,000 troops in Japan, half in Okinawa, where residents have long campaigned for a reduction, complaining of crime, accidents and excessive noise.
Eight thousand of the troops on Okinawa will be relocated to the Pacific island of Guam, a US territory, by 2014.
The US airfield at Futenma, Okinawa, will also be closed by 2014, replaced by two new runways on a less congested part of the island.
Under the deal, US Patriot missiles will be deployed to Japan as soon as possible.
Mr Nukaga said the agreement would help the US-Japanese relationship and be welcomed by thousands of Okinawans.
Mr Rumsfeld said the changes would "result in greater operational coordination than had existed previously".
However, the deal has already sparked opposition in Japan.
The mayor of Iwakuni City, 450km southwest of Tokyo, which would host a relocated US naval air wing, said the plan ignored a local referendum that overwhelmingly rejected the idea.
"This is not something I or the city residents can accept," said Katsusuke Ihara.