New Delhi – India's Supreme Court ruled Saturday that a disputed piece of land in the town of Ayodhya be given to Hindus, paving the way for the building of a Hindu temple at the site where a mosque once stood for Muslim worshippers.

The verdict ends a decades-old legal battle – for now – that has been at the heart of much Hindu-Muslim enmity and violence and still forms the core of Indian religious identity politics.

In 1992, more than 2,000 people were killed in Hindu-Muslim violence after Hindu hardliners destroyed the 16th-century Babri mosque in the town, which is located in the northern state of Uttar Pradesh. The court said the demolition of the Babri mosque was unlawful and ordered that Muslims be given five acres of land elsewhere to build a mosque.

Get Breaking News Delivered to Your Inbox

"Justice would not prevail if the court were to overlook the entitlement of the Muslims who have been deprived of the structure of the mosque through means which should not have been employed in a secular nation committed to the rule of law," said the judgement.

The disputed 2.77 acres of land will now be given to a board of trustees for the construction of a temple for the Hindu god Ram. Hindu groups claim the site is where Ram was born. Muslims have been maintained they prayed at the Babri mosque on the site for generations until 1949, when an idol of Ram was mischievously placed inside the mosque. After that, only Friday prayers were held at the mosque.

Hindu groups believe the mosque was actually constructed on the ruins of a Hindu temple that was demolished by Muslim invaders.

The top court on Saturday, citing archaeological evidence, said a structure located under the disputed site was not an Islamic structure. It did not, however, determine whether or not a Hindu temple was demolished to build the Babri mosque.

Hindu supporters celebrated the verdict outside the Supreme Court, raising slogans of "Jai Shree Ram," hailing the god Ram.

Vishnu Shankar Jain, an attorney who represented the Hindu community, called it "a historic moment for Hindus."

Hindu holy man Shri Narsingh Das Maharaja, right, celebrates after a verdict in a decades-old land title dispute between Muslims and Hindus, in Ayodhya, India, Saturday, Nov. 9, 2019. Rajesh Kumar Singh/AP

One of the Muslims groups fighting the case indicated they may appeal the verdict.

"We are not satisfied with the verdict. … We think it's unjust," said Zafaryab Jilani of the Muslim Babri Action committee. "We respect the top court (but) we have a right to disagree with the verdict," he said.

"This verdict shouldn't be seen as a win or loss for anybody," Prime Minister Narendra Modi wrote on Twitter. "The temple of justice has amicably resolved the issue."

The halls of justice have amicably concluded a matter going on for decades. Every side, every point of view was given adequate time and opportunity to express differing points of view. This verdict will further increase people’s faith in judicial processes. — Narendra Modi (@narendramodi) November 9, 2019

The building of the Ram temple was one of the main election promises of Modi's Bhartiya Janata Party (BJP). Many see the religiously emotive issue as the real reason behind BJP's phenomenal rise since 2014, when Modi won his first term as prime minister.

Ahead of the verdict, police were put on high alert in Ayodhya and several other towns to check any possible violence. Schools and colleges were also asked to remain closed.