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. India's Supreme Court on Saturday ruled in favor of a Hindu temple on a disputed religious ground and ordered that alternative land be given to Muslims to build a mosque. The dispute over land ownership has been one of the country's most contentious issues. (AP Photo/Rajesh Kumar Singh)

NEW DELHI (AP) — India's Supreme Court ruled in favor of a Hindu temple on a disputed religious ground in the country's north and ordered that alternative land be given to Muslims to build a mosque - a verdict in a highly contentious case that was immediately deplored by a key Muslim body.

The dispute over land ownership has been one of India's most heated issues, with Hindu nationalists demanding a temple on the site in the town of Ayodhya in Uttar Pradesh state for more than a century. The 16th century Babri Masjid mosque was destroyed by Hindu hard-liners in December 1992, sparking massive Hindu-Muslim violence that left some 2,000 people dead.

Saturday's verdict paves the way for building the temple in place of the demolished mosque.

It is expected to give a boost to Prime Minister Narendra Modi's Bharatiya Janata Party, which has been promising the majority Hindus a temple of their most revered god Ram in Ayodhya as part of its election strategy for decades. The minority Muslims fear that the court verdict will embolden Hindu hard-liners in the country.

As the news broke, groups of jubilant Hindus poured into Ayodhya's streets and distributed sweets to celebrate the verdict, but police soon persuaded them to return to their homes. As night fell, a large number of Hindus in the town lit candles, lamps and firecrackers to celebrate, and police faced a tougher time in curbing their enthusiasm.

The five Supreme Court justices who heard the case said in a unanimous judgment that 5 acres (2 hectares) of land will be allotted to the Muslim community to build a mosque, though it did not specify where. The court said the 5 acres is "restitution for the unlawful destruction of the mosque."

The disputed land, meanwhile, will be given to a board of trustees for the construction of a temple to the Hindu god Ram.

Hindu hard-liners have said they want to build a new temple to Ram on the site, which they revere as his birthplace. They say the mosque was built after a temple dedicated to Ram was destroyed by Muslim invaders.

Zafaryab Jilani, a representative of the Uttar Pradesh Sunni Central Waqf Board, a key Muslim body in the state and a party to the dispute, opposed the ruling.

"We are not satisfied with the verdict and it's not up to our expectation," he said. "These 5 acres of land don't mean anything to us. We are examining the verdict and whatever legal course is open for us."

Jilani hinted at filing a review petition in the Supreme Court challenging the verdict. At the same time, he appealed to members of all communities to maintain peace.

The judges said that the demolition of the mosque in 1992 was "in violation of the status quo orders of this court." But they didn't order any punitive action against those who demolished the mosque in the presence of several top leaders of Modi's BJP.

The judges said Hindus' belief that Ram was born at the site "is undisputed," and that the Sunni Central Waqf Board had not provided evidence that the Muslims were in exclusive possession of the disputed site.

"It was a huge legal battle and we are happy that we convinced the Supreme Court. It's a historic moment for Hindus," said Vishnu Shankar Jain, an attorney who represented the Hindu community in the case.

Modi hailed the decision and said it had settled a long-standing matter.

"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," he tweeted.

He also in a broadcast over television channels and radio urged "all citizens to come together to build a new India and work for everyone's development."

The main opposition Congress party also welcomed the court verdict and appealed all parties to maintain peace and harmony.

In Islamabad, Pakistan's foreign minister, Shah Mahmood Qureshi, said that the ruling was indicative of the "hate based mindset" of Modi's government.

After the demolition of the mosque, Hindus and Muslims took the issue to a lower court, which in 2010 ruled that the disputed land should be divided into three parts - two for Hindus and one for Muslims.

That was challenged in the Supreme Court by both communities.

The five judges started daily proceedings in August after mediation failed to find a compromise.

Modi had promised to build the temple during 2014 elections that brought him to power. But he later decided to wait for the court verdict despite pressure from millions of Hindu hard-liners who asked his government to bring legislation to build the temple.

Authorities on Saturday increased security in Ayodhya, which is located 550 kilometers (350 miles) east of New Delhi, and deployed more than 5,000 paramilitary forces to prevent attacks by Hindu activists on Muslims, who comprise 6% of the town's more than 55,500 people.

Overall, Hindus comprise more than 80% and Muslims around 14% of India's 1.3 billion people.

The town looked deserted on Saturday, with authorities turning back thousands of Hindu pilgrims who were congregating for a religious event scheduled for Tuesday.

Police have arrested about 500 people for posting provocative messages on social media in Uttar Pradesh. Police also have detained around 5,000 people with criminal backgrounds across the state to prevent them from creating trouble after the court verdict, according to Uttar Pradesh government spokesman Awanish Awasthi.

Authorities have stopped the entry of people into the state through the land border from Nepal, and ordered all of the state's schools and colleges to remain closed until Monday.

___

Associated Press writer Zarar Khan in Islamabad contributed to this report.

Supporters of Vishwa Hindu Parishad (VHP), or World Hindu Council, celebrate the Supreme Court's verdict outside the VHP office in Ahmadabad, India, Saturday, Nov. 9, 2019. India's Supreme Court has ruled in favor of a Hindu temple on a disputed religious ground and ordered that alternative land be given to Muslims. The dispute over land ownership has been one of the country's most contentious issues. (AP Photo/Ajit Solanki)
Supporters of Vishwa Hindu Parishad (VHP), or World Hindu Council, celebrate the Supreme Court's verdict outside the VHP office in Ahmadabad, India, Saturday, Nov. 9, 2019. India's Supreme Court has ruled in favor of a Hindu temple on a disputed religious ground and ordered that alternative land be given to Muslims. The dispute over land ownership has been one of the country's most contentious issues. (AP Photo/Ajit Solanki)
Hindu devotees celebrate the verdict in a decades-old land title dispute between Muslims and Hindus, in Ayodhya, India , Saturday, Nov. 9, 2019. India's Supreme Court on Saturday ruled in favor of a Hindu temple on a disputed religious ground and ordered that alternative land be given to Muslims to build a mosque. The dispute over land ownership has been one of the country's most contentious issues. (AP Photo/Rajesh Kumar Singh)
Residents light firecrackers to celebrate the verdict in a decades-old land title dispute between Muslims and Hindus, in Ayodhya, India , Saturday, Nov. 9, 2019. India's Supreme Court on Saturday ruled in favor of a Hindu temple on a disputed religious ground and ordered that alternative land be given to Muslims to build a mosque. The dispute over land ownership has been one of the country's most contentious issues. (AP Photo/Rajesh Kumar Singh)
Indian Muslims feed sweets to each other after the Supreme Court's verdict in Ahmadabad, India, Saturday, Nov. 9, 2019. India's Supreme Court has ruled in favor of a Hindu temple on a disputed religious ground and ordered that alternative land be given to Muslims. The dispute over land ownership has been one of the country's most contentious issues. (AP Photo/Ajit Solanki)
A Hindu devotee waves an Indian national flag and celebrates a verdict in a decades-old land title dispute between Muslims and Hindus, in Ayodhya, India , Saturday, Nov. 9, 2019. India's Supreme Court on Saturday ruled in favor of a Hindu temple on a disputed religious ground and ordered that alternative land be given to Muslims to build a mosque. The dispute over land ownership has been one of the country's most contentious issues. (AP Photo/Rajesh Kumar Singh)
Police officers stand guard in front of a poster of Hindu god Rama outside the Bhartiya Janata Party (BJP) head office in Mumbai, Saturday, Nov. 9, 2019. India's Supreme Court on Saturday ruled in favor of a Hindu temple on a disputed religious ground and ordered that alternative land be given to Muslims to build a mosque. The dispute over land ownership has been one of the country's most contentious issues. (AP Photo/Rajanish Kakade)
Hindus distribute sweets to celebrate the verdict in a decades-old land title dispute between Muslims and Hindus, in Ayodhya, India , Saturday, Nov. 9, 2019. India's Supreme Court on Saturday ruled in favor of a Hindu temple on a disputed religious ground and ordered that alternative land be given to Muslims to build a mosque. The dispute over land ownership has been one of the country's most contentious issues. (AP Photo/Rajesh Kumar Singh)
Hindus feed a cow as they celebrate the verdict in a decades-old land title dispute between Muslims and Hindus, in Ayodhya, India, Saturday, Nov. 9, 2019. India's Supreme Court on Saturday ruled in favor of a Hindu temple on a disputed religious ground and ordered that alternative land be given to Muslims to build a mosque. The dispute over land ownership has been one of the country's most contentious issues. (AP Photo/Rajesh Kumar Singh)
Hindus celebrate with sweets after a verdict in a decades-old land title dispute between Muslims and Hindus, in Ayodhya, India , Saturday, Nov. 9, 2019. India's Supreme Court on Saturday ruled in favor of a Hindu temple on a disputed religious ground and ordered that alternative land be given to Muslims to build a mosque. The dispute over land ownership has been one of the country's most contentious issues. (AP Photo/Rajesh Kumar Singh)
Hindu holy men celebrate the verdict in a decades-old land title dispute between Muslims and Hindus, in Ayodhya, India , Saturday, Nov. 9, 2019. India's Supreme Court on Saturday ruled in favor of a Hindu temple on a disputed religious ground and ordered that alternative land be given to Muslims to build a mosque. The dispute over land ownership has been one of the country's most contentious issues. (AP Photo/Rajesh Kumar Singh)
Nirmohi Akhara leader Dharam Das, center, celebrates the verdict outside the Supreme Court in New Delhi, India, Saturday, Nov. 9, 2019. State-run broadcaster says India’s top court has ruled for a disputed temple-mosque land for Hindus with alternate land to Muslims. The Supreme Court says in a judgment on Saturday that 5 acres (2.02 hecatres) of land be allotted to the Muslim community represented by the Sunni Central Wakf Board in the northern Indian town of Ayodhya where a 16th century mosque was demolished by Hindu hardliners in 1992. (AP Photo)
A Hindu pilgrim touches in obeisance an image of Hindu deities Rama, Sita and Lakshman in Ayodhya, India , Saturday, Nov. 9, 2019. India's security forces were on high alert ahead of the Supreme Court's verdict Saturday in a decades-old land title dispute between Muslims and Hindus over plans to build a Hindu temple on a site where Hindu hard-liners demolished a 16th century mosque in 1992, sparking deadly religious riots. (AP Photo/Rajesh Kumar Singh)
A Hindu pilgrim touches in obeisance an image of Hindu deities Rama, Sita and Lakshman in Ayodhya, India , Saturday, Nov. 9, 2019. India's security forces were on high alert ahead of the Supreme Court's verdict Saturday in a decades-old land title dispute between Muslims and Hindus over plans to build a Hindu temple on a site where Hindu hard-liners demolished a 16th century mosque in 1992, sparking deadly religious riots. (AP Photo/Rajesh Kumar Singh)
FILE - In this Friday, Oct. 1, 2010, file photo, Hindu holy men look at pillars lying at a workshop for the construction of a Rama temple in Ayodhya, India. State-run broadcaster says India’s top court has ruled for a disputed temple-mosque land for Hindus with alternate land to Muslims. The Supreme Court says in a judgment on Saturday, Nov. 9, 2019, that 5 acres (2.02 hecatres) of land be allotted to the Muslim community represented by the Sunni Central Wakf Board in the northern Indian town of Ayodhya where a 16th century mosque was demolished by Hindu hardliners in 1992. (AP Photo/Rajesh Kumar Singh, File)
FILE - In this Sunday, Nov. 25, 2018 photo, a man holds a brick reading
A police officer stands guards on a street in Mumbai, Saturday, Nov. 9, 2019. India's security forces were on high alert ahead of the Supreme Court's verdict Saturday in a decades-old land title dispute between Muslims and Hindus over plans to build a Hindu temple on a site where Hindu hard-liners demolished a 16th century mosque in 1992, sparking deadly religious riots. India's state broadcaster says that the country's top court rules disputed religious ground in favor of Hindus with alternate land for Muslims. (AP Photo/Rajanish Kakade)