The Ayodhya dispute, which stretches back more than a century, is one of India's thorniest court cases and goes to the heart of its identity politics.
Hindus believe that Ayodhya, a city in the northern state of Uttar Pradesh, is the birthplace of one of their most revered deities, Lord Ram.
Muslims say they have worshipped there for generations.
The Supreme Court has now ruled that the site should be given to Hindus to build a temple there.
Hinduism is India's majority religion and is thought to be more than 4,000 years old. India's first Islamic dynasty was established in the early 13th Century.
What is the row actually about?
At the centre of the row is a 16th-Century mosque that was demolished by Hindu mobs in 1992, sparking riots that killed nearly 2,000 people.
Many Hindus believe that the Babri Masjid was actually constructed on the ruins of a Hindu temple that was demolished by Muslim invaders.
Muslims say they offered prayers at the mosque until December 1949 when some Hindus placed an idol of Ram in the mosque and began to worship the idols.
Over the decades since, the two religious groups went to court many times over who should control the site.
Is the case now over?
This particular case had three main contending parties - two Hindu groups and the Muslim Waqf Board, which is responsible for the maintenance of Islamic properties in India.
The Hindu litigants are the Hindu Mahasabha, a right-wing political party, and the Nirmohi Akhara, which is a sect of Hindu monks.
They filed a title dispute in the Allahabad High Court in 2002, a decade after the mosque was demolished.
A verdict in that case in September 2010 determined that the 2.77 acres of the disputed land would be divided equally into three parts.
The court ruled that the site should be split, with the Muslim community getting control of a third, Hindus another third and the Nirmohi Akhara sect the remainder. Control of the main disputed section, where the mosque once stood, was given to Hindus.
The judgement also made three key observations.
It affirmed the disputed spot was the birthplace of Lord Ram, that the Babri Masjid was built after the demolition of a Hindu temple and that it was not built in accordance with the tenets of Islam.
The Supreme Court suspended this ruling in 2011 after both Hindu and Muslim groups appealed against it.
The 9 November 20919 verdict cited a report by the Archaeological Survey of India (ASI) as evidence that the remains of a building "that was not Islamic" were beneath the structure of the demolished Babri mosque.
The unanimous verdict said the disputed land should be given to Hindus for a temple to Lord Ram, while Muslims would be given land elsewhere to construct a mosque.
It then directed the federal government to set up a trust to manage and oversee the construction of the temple.
However, the court added that the demolition of the Babri mosque was against the rule of law.
The main group of Muslim litigants has said that it will not appeal against the verdict.
What are the other important legal developments?
In 1994 the Supreme Court, which was ruling on a related case, remarked that the concept of a mosque was "not integral to Islam". This may have bolstered the case made by Hindus to secure control of the entire site.
In April 2018, senior lawyer Rajeev Dhavan filed a plea before the top court, asking judges to reconsider this observation.
But a few months later the Supreme Court declined to do so.
Have religious tensions eased in India in recent years?
Ever since the Narendra Modi-led Hindu nationalist BJP first came to power in 2014, India has seen deepening social and religious divisions.
The call for the construction of a Hindu temple in Ayodhya has grown particularly loud, and has mostly come from MPs, ministers and leaders from the BJP since it took office.
Restrictions on the sale and slaughter of cows - considered a holy animal by the majority Hindus - have led to vigilante killings of a number of people, most of them Muslims who were transporting cattle.
An uninhibited display of muscular Hindu nationalism in other areas has also contributed to religious tension.
Most recently, the country's home minister Amit Shah said he would remove "illegal migrants" - understood to be Muslim - from the country through a government scheme that was used recently in the north-eastern state of Assam.