Updated

Okinawa's incumbent governor, who campaigned for the removal of an unpopular U.S. Marine base from the Japanese island, appeared headed for re-election Sunday, in a likely test of the U.S.-Japan security alliance.

Hirokazu Nakaima, 71, looked certain to win the gubernatorial election, public broadcaster NHK said late Sunday. Official results were expected Monday.

The relocation of Marine Corps Air Station Futenma was among the key issues in the campaign. The base has been on Okinawa island since 1945, and residents have long complained it produces aircraft noise and crime.

A 2006 deal between the U.S. and Japan to move the Futenma base to a less crowded part of Okinawa has stalled because of public opposition. The controversy even toppled a prime minister, Yukio Hatoyama, earlier this year.

Nakaima once backed the relocation plan but now opposes it and wants to move the base off Okinawa. His challenger, Yoichi Iha, 58, former mayor of Ginowan city, where Futenma is located, wants the base moved out of Japan entirely.

Nakaima's victory could hamper Prime Minister Naoto Kan's efforts to press ahead with the 2006 agreement because the relocation of Futenma will need the governor's approval.

Okinawa, home to about half of the some 50,000 U.S. troops stationed in Japan, is a strategically important island close to Taiwan and the Chinese mainland and not far from the Korean peninsula.

Kan has said the U.S. military presence in Okinawa is a crucial deterrent for regional security threats, an argument perhaps driven home by North Korea's artillery strike on a South Korean island on Tuesday as well as worries over China's growing military power.

A half-century security alliance allows the U.S. to station military forces in Japan, while guaranteeing the U.S. will defend Japan from any attack. But local opposition to the troops' presence is vocal.

The base controversy is growing into a major thorn in the U.S.-Japan alliance. Both Kan and Hatoyama are from the Democratic Party, which promised a foreign policy less beholden to the United States before its election last year. The largely untested party trounced the long-ruling Liberal Democrats, which had smoothly engineered the alliance with the U.S. and rarely questioned what Washington wanted.

The relocation of Futenma is part of a bigger plan to move more than 8,000 U.S. Marines off Okinawa to the U.S. Pacific island of Guam. But this plan assumes that a still unbuilt base in another part of Okinawa will be completed.