On Tuesday, a magistrate in Ranchi in Jharkhand decided to push the limits of the bail provisions in the Code of Criminal Procedure by imposing a condition that smacked of legal arbitrariness.

On July 13, Richa Bharti, a college student, was arrested for posting content on social media that the police held as objectionable based on a complaint filed by the Anjuman Islamic Committee, a Muslim organisation. The complaint said Bharti’s post hurt the religious sentiments of Muslims.

She moved the magistrate court for bail, which on Tuesday granted her release subject to a bond of Rs 7,000. However, what created a furore in Ranchi was an accompanying condition: the judge asked Bharti to distribute five copies of Quran, the holy text of Muslims, within 15 days to sustain the bail.

The condition led to protests, with a section of lawyers in Ranchi demanding that the judge be removed for abuse of law. On Wednesday, the judge modified his order and removed this condition after the investigation officer herself moved the court against it.

The criminal code provides a fair of degree discretion to the magistrates in awarding bail. If it is non-bailable offence like the one Bharti was booked for, the judge can grant or deny bail depending on the context of the case and the ability of the accused to either escape the clutches of law or influence the investigation. The law also provides magistrates discretion on imposing conditions for bail.

But what the law does not envisage is total arbitrariness. In Bharti’s case, the court had already imposed a monetary bond as condition for release. The judge then decided to blur the lines of judicial functioning and activism by asking her to donate copies of the Quran, which could only be deemed as a punishment even before the start of the trial to establish if she had actually committed the alleged offence.

Moderation seems to have gone out of fashion in the functioning of the lower judiciary in recent times. There is now a growing list of cases in which the judges either mechanically accept the police version and throw the accused in jail without establishing if the cases are warranted, or they take the other extreme route of indulging in the kind of activism that the magistrate in Ranchi did. Such functioning erodes the authority of the lower courts, which are the first resort for citizens whose rights are abused.

But this trend is not confined to the lower judiciary alone. In May, the Supreme Court initially wanted a petitioner seeking bail in a case filed in West Bengal to apologise for her social media post against Chief Minister Mamata Banerjee. The court later decided not to impose this condition, but even a mere suggestion of this sort from the highest court of the land caused discomfort to observers.

Judges should realise that eschewing arbitrariness is a necessary condition to protect the rule of law.