TOKYO -- Hoping to give new momentum to a plan to rework the deployment of U.S. troops in the Pacific, Secretary of State Hillary Rodham Clinton signed an agreement Tuesday with Japan that will move 8,000 Marines off the southern Japanese island of Okinawa to the U.S. territory of Guam.

The framework of the transfer had already been agreed on in 2006, but several major points remain to be worked out, including the location of a base to replace Okinawa's Futenma air station, a major hub for the Marines there.

Officials on both sides have agreed to relocate the operations of the base to another, less crowded part of Okinawa, but local opposition has stalled progress.

"This agreement reflects the commitment we have to modernize our military posture in the Pacific," Clinton said. "It reinforces the core of our alliance -- the mission to defend Japan against attack and to deter any attack by all necessary means."

Japan's Foreign Minister Hirofumi Nakasone also hailed the agreement.

"We believe this Guam agreement shows the strength of our alliance," he said. "We agreed to work toward the implementation of the 2006 pact in a manner that does not compromise readiness or capability."

There are currently about 13,000 Marines stationed on Okinawa, and 23,000 U.S. troops there overall. They are part of about 50,000 U.S. troops deployed in Japan under a post-World War II mutual security pact.

The cost of the realignment plan has generated intense debate in Japan.

Guam's transformation is expected to cost at least $15 billion and put some of the U.S. military's highest-profile assets within the fences of a vastly improved network of bases. In the pact signed Tuesday, Japan agreed to give Washington $2.8 billion for the transfer costs, though its contribution is expected to go higher.

On Monday, The Asahi, a major newspaper, reported that some of the budget will be used to improve Naval and Air Force facilities on Guam. The daily said that would go against the pact, which has been interpreted to limiting Japanese spending to Marine-related projects.