TOKYO — An American air base in Japan will remain on the southern island of Okinawa, the two allies said in a joint statement on Friday, as they reached an agreement that resolved a lingering diplomatic dispute but could also present new domestic challenges for Prime Minister Yukio Hatoyama.

The deal confirmed what Mr. Hatoyama had told outraged Okinawa residents on Sunday, that the United States Marine Corps Air Station Futenma, long despised by local residents for noise, pollution and safety concerns, would be moved to a less populated area — but not off Okinawa.

The agreement largely follows a 2006 pact that called for moving the base from its current location in the city of Ginowan.

“Unfortunately, we were unable to secure the understanding of the Okinawans, which was most important for us,” Mr. Hatoyama told a nationally televised news conference late Friday.

“It was necessary to give the Japan-United States agreement priority, because maintaining trust between the two countries serves as the best deterrence,” he said. “I am sincerely sorry for not being able to keep my word, and what is more, having hurt Okinawans in the end,” he said.

Mr. Hatoyama took power in a historic election last summer with vows to create a more equal relationship with the United States, including a campaign promise to relocate the Futenma base off the island or out of Japan altogether. But he was forced to reconsider as his public approval ratings fell and because Washington demanded that he honor the previous agreement. Fear of North Korea, which may have a small nuclear arsenal and which South Korea has accused of sinking a warship recently, contributed to his decision.

Okinawans immediately lashed out in protest, accusing Mr. Hatoyama of reneging on his pledge to lessen the burden of the United States military presence in Okinawa, home to about half of the 50,000 American military personnel members stationed in Japan under a mutual security pact.

“This amounts to a betrayal of Okinawans,” said Susumu Inamine, mayor of Nago, the city designated to host the relocated base.

“In Okinawa, many still want the base moved out of Okinawa, out of Japan,” said the governor, Hirokazu Nakaima. “There has not been enough discussion.”

The deal on Friday appeared to be an effort by Tokyo and Washington to show they were in agreement after months of mistrust. The statement came soon after Mr. Hatoyama spoke by phone with President Obama, Japanese Foreign Ministry officials said.

During the phone call, Mr. Obama expressed his “gratitude” that an agreement on the base had been reached, the officials said.

It affirms the 2006 pact in specifying that the base would be moved to Camp Schwab, an existing Marine base near Nago and the fishing village of Henoko. It reaffirmed the importance of keeping American Marines in Okinawa, while also pledging to move forward with a broader agreement to relocate some 8,000 Marines to Guam.

The deal also named Tokunoshima, a nearby island, as a possible site for some of the Marines’ training exercises, something the island’s residents fiercely oppose.

“It is a serious matter for the government to ignore the will of the people,” said Akira Okubo, the mayor of Isencho, a town on Tokunoshima. He said he intended to meet with Mr. Hatoyama as soon as possible to express his “resolute opposition.”

The accord also damaged Mr. Hatoyama’s ruling coalition government after the leader of a left-leaning coalition partner rejected the deal, forcing the prime minister to relieve her of her post late Friday.

The former ally, Mizuho Fukushima, head of the Social Democratic Party and a cabinet minister in Mr. Hatoyama’s government, was fired. The Social Democrats were expected to soon discuss whether to stay with Mr. Hatoyama’s coalition government.

“I was dismissed today,” Ms. Fukushima told reporters in Tokyo. "I cannot betray the people of Okinawa," she said.

Though a split would come at a delicate time for Mr. Hatoyama, who will face nationwide elections for Parliament’s upper house in the summer, it would not be fatal because the Democrats hold a majority in the more powerful lower house.

But losing the support of Ms. Fukushima’s party could damage Mr. Hatoyama’s chances of a decisive win in the upper chamber, bringing about the possibility of a hung Parliament.

Washington and Tokyo first agreed to relocate the base in 1996, after a schoolgirl was raped by an American serviceman, but the move was delayed as Japan struggled to find another community to accept it.

Helped by offers from Tokyo of public works projects, the city of Nago finally agreed to host the replacement base. In January, however, the city’s mayor was defeated by an opponent who was against the base and who rode a wave of voter expectations that it would be moved off the island.

Despite the contention over the base, most anger has been directed at Mr. Hatoyama’s flip-flopping on the issue, not the United States. Opinion polls suggest most Japanese back their nation’s security alliance with the United States.

http://www.nytimes.com/2010/05/28/world/asia/28japan.html?ref=todayspaper&pagewanted=print