Tokyo wants to move the unpopular US airbase in a crowded residential district on Okinawa to a sparsely populated area in its north, but many locals want the base moved off the island altogether.
The dispute has seen Okinawan governor Takeshi Onaga and Prime Minister Shinzo Abe's government file rival lawsuits as local authorities have blocked plans to reclaim land for the relocation - a priority for Tokyo as it seeks to satisfy its ally the US.
Tokyo and Washington first proposed moving the Futenma marine air base in 1996, while insisting it must remain on Okinawa - a strategic island in the East China Sea from where US troops and aircraft can react to potential conflicts throughout Asia.
But opponents insist the base should be shuttered and a replacement built elsewhere in mainland Japan or overseas, saying they are sick of noise pollution, accidents and crimes committed by US service members.
More From This Section
"There is no choice but to go ahead with the landfill in order to reduce the trouble at Futenma," Tamiya told the court, according to Jiji Press.
Construction work on the new facility, still in its initial stages, was suspended in March this year, with the central government offering a truce while the case was underway.
"We welcome that the government's argument was accepted," Chief Cabinet Secretary Yoshihide Suga, the government's top spokesman, told reporters.
But he said Tokyo would continue discussions with Okinawa to reach a settlement.
More than half the 47,000 American troops in Japan under a decades-long security alliance are stationed on Okinawa, the site of a major World War II battle that was followed by a 27-year US occupation of the island.
A series of crimes including rapes, assaults and hit-and-run accidents by military personnel, their dependants and civilians have long sparked protests.