Congress general secretary Priyanka Gandhi Vadra prayed at the Hanuman Garhi temple in Uttar Pradesh's Ayodhya, but kept away from the makeshift Ram Lalla shrine at the site of the Ram Janmabhoomi-Babri Masjid case.
While she was inside the temple, Congress and BJP supporters shouted slogans against each other outside, news agency PTI reported. Priyanka Gandhi's visit to the temple marked the end of a 50-km road show from Kumar Ganj, during which she met supporters at several places.
She said Prime Minister Narendra Modi has ignored his own Varanasi constituency and instead went on world tours. She took a swipe at PM Modi's remarks at a rally that Congress leaders made many in Pakistan happy.
"Pakistan mein biryani khane ke liye to woh gaye thhe naa (it was he who went to Pakistan to eat their biryani)," she told reporters, in an apparent reference to the Prime Minister's Lahore visit in 2015.
Priyanka Gandhi's visit to Ayodhya came on the last day of her three-day campaign in Uttar Pradesh. Earlier, she travelled to the family bastions of Amethi and Raebareli.
The Hanuman shrine darshan is the latest in a series of temple visits by Priyanka Gandhi, who is in charge of eastern Uttar Pradesh for the Congress. Local Congress candidate Nirmal Khatri was among those accompanied her to the 18th century Hanuman temple.
As she offered prayers, residents and sadhus gathered outside, so did a group of BJP supporters who tried to show a black flag, PTI reported. Congress then shouted "chowkidar chor hai", following which there was a scuffle between the two groups.
"We used light force to disperse the mob," Faizabad city senior police officer Anil Singh Sisodia said.
Hanuman Garhi temple mahant Gyan Das said he wished the Congress leader well. "Priyanka Gandhi will get the blessings from Hanuman Garhi," he said.
Iqbal Ansari, a litigant in the Ram Janmabhoomi-Babri Masjid dispute, said the visit was a matter of her personal belief. "But this is a political stunt. No work has been done by the Congress for the development of Ayodhya," he added.
With inputs from PTI