TOKYO - The United States wants to stick to a deal on realigning U.S. troops in Japan, Defense Secretary Robert Gates said on Tuesday, giving Japan's new government little room to move on an issue that could test ties.

Investors have expressed concern that Japan's pivotal security alliance with the United States could suffer under the new government at a time when China's military power is growing and North Korea remains as unpredictable as ever.

A broad plan to reorganize U.S. forces in Japan was agreed in 2006 with Japan's long-dominant conservative party after a 1996 deal failed to gain local support.

The realignment pact is meant to reduce the U.S. military footprint on the southern island of Okinawa while improving the ability of the two forces to cooperate.

Prime Minister Yukio Hatoyama's Democratic Party, however, ousted its conservative rivals in an August election, pledging to take a diplomatic stance less dependent on the United States.

We are committed to advancing and implementing our agreed alliance transformation agenda, Gates told Foreign Minister Katsuya Okada at the beginning of a meeting.

Gates told reporters on his plane before arriving in Tokyo he saw no other options.

There are really, as far as we're concerned, no alternatives to the arrangement that was negotiated. We've looked over the years at all of these alternatives and they are either politically untenable or operationally unworkable.

But both Okada and Gates emphasized the importance of the alliance, and Gates said he expected his trip would lay the groundwork for a successful visit to Japan by U.S. President Barack Obama next month.

BASE SHIFT

Central to the troop realignment is a plan to relocate a U.S. Marine air base on Okinawa to a less crowded part of the southern island.

Hatoyama has said he wants the base moved off the island. U.S. officials have ruled that out, saying it would undermine broader security arrangements that took 15 years to work out.

Japanese Chief Cabinet Secretary Hirofumi Hirano said Tokyo wanted to deal with the matter flexibly while heeding the views of Okinawa residents, many of whom feel they have borne an unfair share of the burden for the U.S.-Japan security alliance, as well as the stance of two tiny ruling coalition partners.

We want to deal with this while reducing the burden on the people of Okinawa, taking into account the three-party coalition agreement and placing importance on the U.S.-Japan relationship, Hirano told a news conference.

Okada said before talks with Gates that Tokyo would try to thrash out a definite stance by year-end, but that this might prove difficult.

Japan, whose own forces are restricted by its pacifist constitution, hosts about 47,000 U.S. military personnel as part of a decades-old security alliance. But many residents near U.S. bases complain of crime, noise, pollution and accidents.

The United States and Japan agreed three years ago to move functions of the Futenma air base to a less crowded part of Okinawa as part of a deal that also includes shifting 8,000 Marines from Okinawa to the U.S. territory of Guam.

Washington is keen to move ahead with the project, which is supposed to be completed by 2014.

Some analysts, though, said it might be unwise for the United States to press Hatoyama's new government so hard now given the difficulties the prime minister faces balancing the conflicting demands of his coalition, Okinawa residents and Washington.

This issue is particularly sensitive for the coalition government, so Gates coming out so strong could possibly destabilize the government in a way not desirable for the American government, said Sophia University's Koichi Nakano.

The outcome is probably going to be a very limited change of the current plan anyway, so it doesn't look like a very good idea to push the Democrats very hard on this.

Washington also wants Japan to come forward with new forms of assistance to Afghanistan if Tokyo follows through with plans to halt a naval refueling mission backing coalition forces.

Gates, who will also visit Seoul this week, said he would discuss ways that Japan and South Korea could contribute to the stalled war in Afghanistan, which is facing a resurgent Taliban and rising casualties after eight years of fighting.

(Additional reporting by Linda Sieg, Yoko Kubota, Yoko Nishikawa and Isabel Reynolds in Tokyo; Editing by Dean Yates)