Tensions go back to 1528 when the Babri mosque was built by Mughal emperor Babur on the site where some Hindus say their revered deity Lord Ram was born.
But it was not until after India's independence in 1947, when the subcontinent was torn by religious rioting, that the issue took on greater significance.
A group of rightwing Hindus, demanding the complex be handed over to them so that the temple to Ram could be reconstructed, filed a petition in the Allahabad High Court soon after independence.
Little came of it, however, and the issue remained low-key until the late 1980s when the Hindu nationalist Bharatiya Janata Party (BJP) rekindled it as part of a strategy to garner political support from India's overwhelming Hindu population.
Strongly backed by sister organisations such as the Vishwa Hindu Parishad (VHP), the BJP took to the streets demanding the complex be handed over to them for "reconstruction" of the Ram temple which they said was demolished by Babur to build the mosque.
Razing the mosque
Hindu activists made a failed attempt to raze the mosque in 1989, with dozens dying when police opened fire on them.
In December 1992, tens of thousands of Hindus gathered at Ayodhya led by then BJP president and current opposition leader Lal Krishna Advani and many top BJP leaders.
The leaders reportedly lost control of the situation and mobs attacked the ancient three-dome structure, razing it to the ground in a matter of hours.
Advani and many others were arrested as the country was thrown into a cauldron of Hindu-Muslim riots in which at least 2000 people were killed.
Control of the complex, where the Hindu activists put up a makeshift temple, was taken over by the Supreme Court.
In 2002 sectarian rioting broke
out in the state of Gujarat
The dispute over the ownership of the site - whether it belongs to Hindus or Muslims - has been part of a long drawn out litigation process in the High Court of Allahabad in Uttar Pradesh state where Ayodhya is also located.
Last year, the court ordered the Archaeological Survey of India (ASI) to dig beneath the disputed site to determine the Hindus' claim that ruins of a temple exist under the rubble.
The ASI said its survey, conducted by hi-tech radar technology, did indeed reveal remnants of a temple below the compound. Its report has been submitted to the high court which has yet to deliver a final verdict on the issue.
In 2002, sectarian rioting broke out in western Gujarat state after 59 Hindus, returning from a pilgrimage to Ayodhya, were burned to death in a train compartment allegedly by a Muslim mob at Godhra railway station.
An inquiry panel later said that the fire was accidental.
At least 2000 people, mostly Muslims, were killed in rioting following the blaze.