Japan's top court on Wednesday ruled that an Okinawa city government's offer of a land lot to a Confucian temple free of charge was unconstitutional as it violated the principle of the separation of religion and state.

It became the third case in Japan in which the Supreme Court found a violation of the Constitution that bans religious organizations from receiving any privileges from the state. Lower courts had also judged the practice of the Naha city government unconstitutional.

Presiding Justice Naoto Otani, who heads the top court, said the capital city of Okinawa Prefecture's waiver of the land usage fees for the Confucian temple, which sits on a city-run park, infringes Article 20 of the supreme law, which bans municipalities from engaging in religious activities.

"The Naha city government could be judged to be aiding a certain religion," said the ruling made by the top court's Grand Bench.

The Supreme Court also determined that the temple built by a group of descendants of people who had moved from China to Japan in the 14th century is a religious facility, but that its historical value and significance as a tourist spot cannot warrant free land usage.

The latest temple was completed in 2013 at the park after Naha gave permission for the descendants' group to rebuild the facility. A former temple had been burned down during World War II and a successor facility was built at a separate location.

In 2014, a Naha resident filed a lawsuit claiming the city's decision not to charge monthly land usage fees of around ¥480,000 ($4,600) was unconstitutional.

In 2018, the Naha District Court found the temple to be "highly religious," as its gate was opened only once a year during an annual festival. The Naha branch of the Fukuoka High Court upheld the decision the following year.