Nago is where Washington and Tokyo agreed in 2006 to move the Futenma U.S. Marine airfield from a more crowded part of the southern Japanese island. The deal was part of a broader realignment of American troops forged after a helicopter from the base crashed into a nearby university.
Japan's new government - led by a party that was in the opposition when the deal was inked - is reconsidering the agreement, an about-face that has strained ties between the two allies.
Prime Minister Yukio Hatoyama has postponed a decision on Futenma until May. Seen as a litmus test of local sentiment, Sunday's election result could play a pivotal role in his verdict.
More than half of some 47,000 American troops stationed in Japan are in Okinawa, where many residents complain about noise, pollution and crime linked to the bases.
Nago's 60,000 residents are increasingly opposed to hosting a new base, which would likely require bulldozing beaches near an existing Marine facility. The issue has sparked intense protests and dominated debate between the two mayoral candidates.
Turnout in the election was high, with nearly 77 percent of the city's 45,000 registered voters casting ballots. Inamine won with 52.3 percent of the vote, according to the city's election office.
Shimabukuro, Nago's outgoing mayor, supports the base for the jobs and investment it would bring to the area about 900 miles (1450 kilometers) from Tokyo. But he made little mention of that this weekend, arguing instead that the city should not dictate such national decisions and highlighting his achievements as mayor.
His challenger staunchly opposed the base and ran with the support of the ruling Democratic Party of Japan.
After securing victory, Inamine pledged to jubilant supporters gathered at his office that he would resist expansion of U.S. military presence in the city.
"This result represents one single will of local people," Inamine said of his victory, according to Kyodo News agency.
The Futenma facility, home to about 2,000 Marines, is one of the corps' largest facilities in the Pacific. The United States insists the base must stay somewhere in Okinawa so that the Marine units remain cohesive. But some Japanese politicians have suggested moving the facility off the island altogether - or even out of the country.
Under a security pact signed in 1960, U.S. armed forces are allowed broad use of Japanese land and facilities. In return, the U.S. is obliged to respond to attacks on Japan and protect the country under its nuclear umbrella.