Way back in the 19th century when the case was brought before a court, it was decided that a temple could not be built on a spot just outside the mosque because it would cause communal problems. Since then, various local courts have looked at matters and issued orders and the cases continued moving up until a special full-judge bench of the Allahabad High Court decided in 2010 that the land would be split three ways between the primary litigants, the deity, the Nirmohi Akhara and the Sunni Waqf Board. All three then appealed in the Supreme Court, which stayed the High Court decision. Various attempts were made at mediation, including while the Supreme Court was hearing the appeal, but none managed to bring all parties on board.
The case first made its way to a court of the British Raj in the 19th century, though the specific legal matters being decided here date back to events from 1949 when an idol of the Hindu god Ram was placed under the central dome of the Babri Masjid, a mosque believed to have been built by the Mughals under Babar in the 16th century. There have been claims from both Hindu and Muslims litigants for the right to own and worship at these premises. In the 1980s, the BJP and its parent organisation, the Rashtriya Swayamsevak Sangh, used the demand for a Ram temple to be built on the spot as the foundation for a massive, communally divisive campaign around the country, sparking riots and deaths along the way and culminating in a Hindutva mob demolishing the mosque in 1992.
Verdict of the Case by SC in 2019
The Supreme Court ordered the land to be handed over to a trust to build the Hindu temple.
The Court ordered the Government of India to create a trust to build the Ram Mandir temple and form a Board of Trustees within three months. The disputed land will be owned by the Government of India and subsequently transferred to the Trust after its formation.
The Court ordered the entire disputed land of area of 2.77 acres to be allocated for the construction of a temple while an alternative piece of land of area of 5 acres be allocated to the Sunni Waqf Board for the construction of a mosque at a suitable place within Ayodhya.
The Court ruled that the 2010 Allahabad High Court's decision, division of the disputed land was incorrect.
The Court ruled that the Demolition of the Babri Masjid and the 1949 desecration of the Babri Masjid was in violation of law.
The Court observed that archaeological evidence from the Archaeological Survey of India shows that the Babri Masjid was constructed on a "structure", whose architecture was distinctly indigenous and non-Islamic.
The ruins of an ancient religious structure under an existing building does not always indicate that it was demolished by unfriendly powers, the Supreme Court held in its 1,045-page judgment in the Ayodhya case.
The court observed that all four of the Janamsakhis (biographies of the first Sikh guru, Guru Nanak) state unambiguously and in detail that Guru Nanak made pilgrimage to Ayodhya and offered prayers in the Ram temple in 1510–11 AD. The court also mentioned that a group of Nihang Sikhs performed puja in the "mosque" in 1857.
The Court said that Muslim parties, including the Sunni Waqf Board, failed to establish exclusive possession of disputed land. It said that the Hindu parties furnished better evidence to prove that Hindus had worshipped continuously inside the mosque, believing it to be the birthplace of the Hindu deity Rama. The Court cited that iron railings set up in 1856–57 separated the inner courtyard of the mosque from the outer courtyard, and that Hindus were in exclusive possession of the outer courtyard. It said that even before this, Hindus had access to the inner courtyard of the mosque.
The Court ruled that the suit filed by Nirmohi Akhara could not be upheld and it had no shebait rights. However, the court ruled that Nirmohi Akhara should be given appropriate representation in the Board of Trustees.
The Court rejected the claim made by Shia Waqf Board against the Sunni Waqf Board for the ownership of the Babri Masjid.