Chief Minister Yogi Adityanath, Samajwadi Party chief Akhilesh Yadav asked him to "reveal" caste of other Gods so he could pray to the God of his caste.
Mr Yadav's remarks come days after Chief Minister Yogi Adityanath's comment on Lord Hanuman.
Yogi Adityanath had, during a poll rally in Rajasthan's Alwar district, said, "Bajrang Bali (Hanuman) is such a god that he is a forest-dweller, lives in the mountains. Dalits, deprived, he takes everyone along, from east to west, north to south, and unites them all."
Following the comment, a group that calls itself the "Rajasthan Sarv Brahmin Mahasabha" had sent the saffron-wearing chief minister a legal notice accusing him of hurting sentiments of devotees and playing on Hanuman's caste for votes in Rajasthan.
Yogi Adityanath's supporters say the group based its notice on a distorted version of Yogi Adityanath's speech, in which he seemed to say "Bajrang Bali (Hanuman) is such a god that he is a forest-dweller, lives in the mountains, is a dalit, deprived..."
Mr Yadav, during his interaction with the media, said, "Caste of only some Gods have been revealed. It will be good if he tells caste of all of them. I will also pray to the God of my caste."
Mr Adityanath was strongly criticised by the opposition for his remarks while one of its own Dalit minister quit the party.
Bahraich BJP MP Savitri Bai Phule claimed that Lord Hanuman was "a Dalit and a slave of 'manuwadi' people" and alleged that Dalits and backwards were being called 'bandar' (monkey) and 'rakshas' (demon).
The Lok Sabha member quit the BJP last week, charging it with playing politics to divide the society.
Commenting on the recently-concluded assembly elections in five states, including Madhya Pradesh, Chhattisgarh and Rajasthan, Mr Yadav said the outcome was "encouraging".
"Results of assembly polls are out. I thank people of these state especially of Chhatisgarh, Madhya Pradesh and Rajasthan and welcome the 'janadesh'. Though our (SP's) performance was not good, we won a seat in Madhya Pradesh and stood at second at some places," he said.
"Presently I am seeing how strong my party is and emphasising on its preparations up to booth level. The SP always stood against communal forces and its objective is to see happy and prosperous India."
Mr Yadav said that his party did not contest many seats so that it did not ruin the political pitch of other parties against the BJP.
"We did not contest too many seats. We contested on seats where we had some base. We did this to not botch political prospects of other parties against the BJP," he said, adding that his party has already offered support to the Congress in Madhya Pradesh.
(With Inputs From PTI)