A vacation bench of the Supreme Court on Tuesday granted bail to Bharatiya Janata Party leader Priyanka Sharma, who was arrested in West Bengal’s Howrah district on Friday for sharing a morphed picture of Chief Minister Mamata Banerjee. The court ordered Sharma’s immediate release.

The court first asked Sharma to also tender a written apology as a condition for her release, but later modified the order, and said she should apologise when she was set free. “The detenue, Priyanka Sharma, is directed to be immediately released on bail,” the bench said, according to PTI. “The detenue shall, however, at the time of release, tender an apology in writing for putting up/sharing the pictures complained of on her Facebook account. It is made clear that this order is being made in the special facts and circumstances of this case and shall not operate as a precedent.”

Senior counsel Neeraj Kishan Kaul, who represented the petitioner, told the court that Sharma’s arrest was a gross violation of her constitutional rights. “She deleted the post before she was arrested,” he added. “This meme is going viral, she is not the only one who shared it.”

However, Justice Sanjiv Khanna said since elections were going on and Sharma was from the BJP “the other side might take the meme differently”, Bar and Bench reported. Kaul then urged the court to grant his client bail while he took instructions “on apology from her”.

The lawyer said he was concerned that she was being made to apologise for sharing the meme. “Anyone else tomorrow will be told that you will be arrested for memes and you will have to apologise for bail,” he added. However, Khanna said the court was not “correlating the two aspects of apology and release from custody”.

When the lawyer said the meme doing rounds was a form of “evolving caricature, humour, political satire”, Justice Indira Banerjee said though it might have been shared widely, it was wrong. “Freedom of expression is non-negotiable but cannot impinge upon another person’s rights, “ the judge added.

News18 reported that the Howrah Police Cyber Cell had filed its closure report in the court of the chief judicial magistrate on Monday, seeking that the case be closed. However, since Sharma’s lawyers were unaware of this, they reportedly had to issue an apology in the Supreme Court.

The meme Sharma had shared showed Mamata Banerjee’s face photoshopped on a picture of Bollywood actor Priyanka Chopra from the MET Gala in New York. The top court had agreed to hear Sharma’s petition against the arrest on Monday.

Sharma, who is also the convenor of the BJP’s Mahila Morcha in Howrah, had earlier been remanded to 14 days in judicial custody after Trinamool Congress leader Bibhas Hazra filed a complaint against her. “Such a despicable act with the chief minister’s picture is absolutely unacceptable,” he had said. BJP workers and Sharma’s family have protested against the arrest and claimed that it was politically motivated.