India's Supreme Court awarded a bitterly disputed religious site to Hindus, dealing a defeat to Muslims who also claim the land that has sparked some of the bloodiest riots in the history of independent India.
The ruling in the dispute between Hindu and Muslim groups paves the way for the construction of a Hindu temple on the site in the northern town of Ayodhya, a proposal long supported by Prime Minister Narendra Modi's ruling Hindu-nationalist party.
Representatives of the Muslim group involved in the case criticised the judgment as unfair and said it was likely to seek a review of the verdict.
In 1992 a Hindu mob destroyed the 16th-century Babri Mosque on the site, triggering riots in which about 2,000 people, most of them Muslims, were killed across the country.
Court battles over the ownership of the site followed.
Jubilant Hindus, who have long campaigned for a temple to be built on the ruins of the mosque, set off fire crackers in celebration in Ayodhya after the court decision was announced.
Thousands of paramilitary force members and police were deployed in Ayodhya and other sensitive areas across India.
There were no immediate reports of unrest.
"This verdict shouldn't be seen as a win or loss for anybody," Mr Modi said on Twitter.
"May peace and harmony prevail!"
Still, the verdict is likely to be viewed as win for Mr Modi's ruling Bharatiya Janata Party (BJP) and its backers.
It comes months after Mr Modi's government stripped the Muslim-majority Jammu and Kashmir region of its special status as a state, delivering on yet another election promise to its largely Hindu support base.
Neelanjan Sircar, an assistant professor at Ashoka University near New Delhi, said the court ruling would benefit the BJP, which won re-election in May, but a slowing economy would ultimately take centre stage for voters.
"In the short term, there will be a boost for the BJP," said Prof Sircar.
"These things don't work forever ... Ram Temple isn't going to put food on the table."
Hindus believe the site is the birthplace of Lord Ram, a physical incarnation of the Hindu god Vishnu, and say the site was holy for Hindus long before the Muslim Mughals, India's most prominent Islamic rulers, built the Babri mosque there in 1528.
The five-judge bench, headed by the Chief Justice Ranjan Gogoi, reached a unanimous judgment to hand over the plot of just 2.77 acres, or about the size of a soccer field, to the Hindu group.
The court also directed that another plot of 5 acres in Ayodhya be provided to the Muslim group that contested the case but that was not enough to mollify some.
"The country is now moving towards becoming a Hindu nation," Asaduddin Owaisi, an influential Muslim opposition politician, told reporters.
Mr Modi's party hailed the ruling as a "milestone".
"I welcome the court decision and appeal to all religious groups to accept the decision," Home Minister Amit Shah, who is also president of the BJP, said on Twitter.
The Sunni Muslim group involved in the case said it would likely file a review petition, which could trigger another protracted legal battle.
"This is not a justice," said the group's lawyer.
Muslim organisations appealed for calm.
The Hindu group Rashtriya Swayamsevak Sangh - the parent organisation of Mr Modi's party - had already decided against any celebrations to avoid provoking sectarian violence between India's majority Hindus and Muslims, who constitute 14% of its 1.3 billion people.
Restrictions were placed on gatherings in some places and internet services were suspended.
Elsewhere, police monitored social media to curb rumours.
Streets in Ayodhya were largely deserted and security personnel patrolled the main road to Lucknow, the capital of the northern state of Uttar Pradesh.