Union minister Narayan Rane was on Tuesday granted bail by a court in Maharashtra’s Mahad city, hours after his arrest for a comment about slapping Chief Minister Uddhav Thackeray, PTI reported. Rane told the court that the accusations against him were politically motivated and that he was arrested without notice, NDTV reported.

Rane will have to appear for questioning before the police on August 31 and September 13, his lawyer Sangram Desai told ANI. “He [Rane] has also been told not to do such a thing in future,” Desai added, according to NDTV.

Magistrate SS Patil said that he found the arrest to be “justified”, considering its reason. The court also observed that a few charges against Rane were bailable.

The charges in the four FIRs against Rane include sections under the Epidemic Diseases Act and the Indian Penal Code’s Sections 188 (disobedience to public servant’s orders), 269 and 270 (act to spread disease) and 34 (criminal act by several persons with common intention).

Rane on Wednesday filed a petition in the Bombay High Court to quash the FIRs against him, ANI reported.

Rane, who is from the Bharatiya Janata Party, had made the remark at an event in Raigad on Monday. He claimed that Thackeray had forgotten the year of independence during his August 15 speech.

“It is shameful that the chief minister does not know the year of independence,” Rane had said, according to PTI. “He leaned back to enquire about the count of years of independence during his speech. Had I been there, I would have given [him] a tight slap.”

The Union minister’s comment triggered a huge controversy in Maharashtra on Tuesday.

In Nashik, Shiv Sena workers threw stones at the BJP’s office. Some others, on their way to Rane’s home in Mumbai, clashed with BJP workers and the police. Party workers in Pune threw slippers at Rane’s posters, according to PTI.

Rane was arrested while having a meal in Ratnagiri district, the Hindustan Times reported. The minister had been participating in the BJP’s countrywide Jan Ashirwad Yatra programme.

This was the first time in 20 years that a central minister has been arrested, according to NDTV. Rane joined the Cabinet in July as the minister for micro, small and medium Enterprises.

BJP chief Jagat Prakash Nadda said that Rane’s arrest was in violation of constitutional values and that the party will not be scared or suppressed by such actions. Former Maharashtra Chief Minister Devendra Fadnavis, meanwhile, said the party did not support Rane’s statement but stood with him.