The Supreme Court on Tuesday directed the Uttar Pradesh government to immediately release on bail journalist Prashant Kanojia who was arrested for tweeting a defamatory video about Chief Minister Adityanath, ANI reported. It asked the Uttar Pradesh government to “show magnanimity in releasing” the journalist.

A vacation bench of Justices Indira Banerjee and Ajay Rastogi passed the order on a habeas corpus petition filed by Kanojia’s wife, Jagisha Arora, seeking is release. The bench said Kanojia’s arrest and remand was illegal, which resulted in “deprivation of personal liberty”, Live Law reported.

“Opinions may vary, he [Kanojia] probably should not have published or written that tweet, but on what basis was he arrested?” the top court asked. The court said that an order of the magistrate placing Kanojia in remand till June 22 is not appropriate, reported Live Law.

When Additional Solicitor General Vikramjit Banerjee, who argued on behalf of the state, said the order of remand should be challenged in a lower court and not in a habeas corpus petition, Justice Indira Banerjee said: “If there is a glaring illegality, we cannot fold our hands and say go to lower courts.”

The top court asked why Kanojia was ordered to be in remand for 11 days. “Is he a murder accused?” the court asked. “If there is deprivation of personal liberty, Supreme Court can interfere.”

The additional solicitor general said Kanojia’s release will be seen as an endorsement of his tweets, reported Bar and Bench. Justice Banerjee, however, said: “It will be treated as an endorsement of his personal liberty. Even we hear the brunt on social media but does that mean it should lead to incarceration?”

Kanojia’s wife thanked the top court and said she was very happy with the court order, according to News18. “I have faith in our Constitution,” Jagisha Arora said.

Kanojia’s wife had moved the top court on Monday after he was arrested in Delhi on Saturday for his comments about Uttar Pradesh Chief Minister Adityanath on social media. A first information report was registered against the journalists the previous night alleging that he made comments “maligning the image of the chief minister”.

A case was filed under Section 500 of the Indian Penal Code, which relates to punishment for defamation, and Section 66 of the Information Technology Act, which refers to computer-related offences. A press statement released by the police on Saturday additionally mentioned Section 67 of the Information Technology Act, which relates to publishing or transmitting obscene material in electronic form, and Section 505 of the IPC, which penalises statements conducing to public mischief.

In the video that Kanojia shared, a woman is seen speaking to reporters outside the chief minister’s office claiming that she had been talking to Adityanath over video chat and had sent a marriage proposal to him. Kanojia was a former journalist at The Wire Hindi.

Two other journalists – Ishita Singh, who is the head of news channel Nation Live, and Anuj Shukla, one of the channel’s editors – were also arrested on Sunday after the channel allegedly aired the video. The police claimed the channel does not have the requisite licence to operate.