Sheikh Saaliq and Krutika Pathi / Associated Press

For nearly three centuries, Muslims and Hindus in India’s northern Varanasi city have prayed to their gods in a mosque and a temple that are separated by one wall. Many see it as an example of religious coexistence in a country where bouts of deadly communal violence are common.

That coexistence is now under threat due to a controversial court case.

A local court earlier this month began hearing a petition filed by a group of Hindus that seeks access to pray inside the Gyanvapi mosque compound, arguing it was built on top of the ruins of a medieval-era temple that was razed by a Mughal emperor. The petitioners say the complex still houses Hindu idols and motifs, a claim that has been contested by the mosque’s authorities.

The legal battle is the latest instance of a growing phenomenon in which Hindu groups petition courts demanding land they claim belongs to Hindus. Critics say such cases spark fears over the status of religious places for India’s Muslims, a minority community that has come under attack in recent years by Hindu nationalists who seek to turn officially secular India into an avowedly Hindu nation.

“The idea to bombard the courts with so many petitions is to keep the Muslims in check and the communal pot simmering,” said Nilanjan Mukhopadhyay, a political analyst and commentator. “It is a way to tell Muslims that their public display of faith in India is no more accepted and that the alleged humiliation heaped on them by Muslim rulers of the medieval past should be redressed now.”