Now, many Hindus are confident the land will remain in their hands.

A 16th-century mosque, the Babri Masjid, once stood here, a reminder of India’s history under Mughal rule. In 1992, Hindu activists demolished the stone structure, spurred by the belief that Ram, a widely revered deity, was born thousands of years ago on the same spot.

Monthslong religious riots followed, killing around 2,000 people. The question of what to do dragged in India’s courts. Hindu litigants pushed to erect a temple. Muslims vowed to rebuild the mosque. India’s identity as an inclusive and secular nation hung in the balance.

Judges feared more bloodshed if they hinted at partiality, though a de facto solution has persisted: Men who destroyed the mosque erected a makeshift tent that approximated a Hindu temple. It still stands, drawing thousands of visitors every day.

With the recent commanding election victory for Prime Minister Narendra Modi’s Bharatiya Janata Party, or B.J.P., many expect that the arrangement will be made permanent.