The Gyanvapi mosque was built in the 17th century by the Muslim Mughal empire then ruling over much of India in a city where Hindu faithful from across the country cremate their loved ones by the Ganges river.
It is among several Islamic places of worship that Hindu activists, backed by Prime Minister Narendra Modi's party, have sought for decades to reclaim for their faith in disputes that have previously sparked deadly religious riots.
The Allahabad High Court on Tuesday directed a lower bench to evaluate petitions on the future of the mosque, which historians say was built over the demolished ruins of a temple to the Hindu deity Shiva.
The decision would permit several civil suits to proceed from Hindus demanding the right to worship at the Gyanvapi site and the restoration of a temple on its grounds.
Presiding justice Rohit Ranjan Agarwal ordered a lower court to rule on the site's future within six months, describing the dispute as a matter of "national importance".
"It is not a suit between two individual parties. It affects two major communities of the country," he said, according to local media reports published Wednesday.
Emboldened right-wing Hindu groups have laid claim to several Muslim sites of worship they say were built atop ancient temples during Mughal rule.
Hindu zealots in 1992 demolished the centuries-old Babri Masjid in the nearby city of Ayodhya, sparking sectarian riots that killed more than 1,000 people nationwide.
A decades-long court battle over the future of the ruined mosque's site ended in 2019 when the Supreme Court permitted the construction of a temple to the deity Ram, who according to scripture was born in the city.
Prime Minister Modi, whose party has campaigned for the temple for decades, will inaugurate the structure next month ahead of national elections in which he is widely expected to win a third term.
Modi's party has come to be the dominant force in Indian politics thanks to its muscular appeals to the country's Hindu majority, emboldening the faith's hardliners.
Calls for India to enshrine Hindu supremacy in law have rapidly grown louder since he took office in 2014, making its 210-million-odd Muslims increasingly anxious about their future.