The Indian Supreme Court on Monday called out the country's election commission for not taking action against the perpetrators of hate speeches made on religious lines during election rallies, India Today reported.
The two have been barred from using social media as well.
Mayawati was issued the notice for her speech in Deoband in which she appealed to Muslims to not vote for the Congress.
"This is the first show cause and action against the BSP president ... the severity of the action is, therefore, different", he said.
Days later, hitting out at Mayawati, Yogi Adityanath said, "If the Congress, the SP and the BSP have faith in Ali, then we too have faith in Bajrang Bali" - a comment that triggered outraged protests from the opposition.
According to reports, the Election Commission "condemned" the two speeches and "censured" the politicians before issuing a gag order.
In a separate order against Ms. Gandhi, the EC said it had seen the video recording of her speech and was convinced that it violated the provisions of the model code as laid down in Para 3 and 4 of Part-1 of the "General Conduct" section, pertaining to bribing or intimidation of voters.
The apex court said then it was appropriate to examine the scope of powers of the poll panel which is also a constitutional body.
The EC may have to explain on Tuesday how it chose to take action when Mayawati and Adityanath had not filed reply to the notices. While Ali is revered by Muslims as Prophet Mohammad's successor, Bajrang Bali is another name for Lord Hanuman.
In its order on Adityanath, the poll panel observed that being the chief minister of a state, he has an "added responsibility to not only uphold the basic tenets, including secularism, of the Constitution of India, but also to display the same in his public appearances".
The EC had earlier asked her to explain her position on the matter in 24 hours of receiving the notice.
The bench referred to submissions of the EC that they can issue a notice, then advisory and finally lodge a complaint against an errant politician for violating the Model Code of Conduct (MCC) by giving hate speeches based on caste and religion during campaign.
The EC had taken a similar step in the 2014 Lok Sabha polls when it had banned BJP leader Amit Shah and SP leader Azam Khan from campaigning in Uttar Pradesh on April 11 for their controversial remarks.