Pakistan authorities must immediately release journalist Imran Riaz Khan and ensure that members of the press can work freely and without fear of reprisal, the Committee to Protect Journalists said Thursday.

On the evening of Tuesday, July 5, police in the outskirts of Islamabad, the capital, arrested Khan, an anchor with the privately owned broadcaster Express News and host of a YouTube channel with over 3 million subscribers, according to news reports and a statement by the Pakistan Press Foundation, a local press freedom group.

Police arrested him in response to a complaint filed to authorities in Attock, in northeast Punjab province, according to those reports. A court in Attock ordered that Khan be freed on Thursday, but police from the Punjab city of Chawkal re-arrested him outside the courtroom immediately after his release, according to news reports.

“The repeated arrests of Pakistani journalist Imran Riaz Khan and the slew of cases registered against him are pure harassment, and must come to an immediate end,” said Carlos Martinez de la Serna, CPJ’s program director. “Authorities must immediately release Khan and ensure that journalists can safely and freely comment on state institutions, including the military.”

Khan is a vocal critic of the government led by Prime Minister Shehbaz Sharif, and is a supporter of former Prime Minister Imran Khan, who was ousted from power in April and is not related to the journalist, according to CPJ reporting and The Express Tribune.

In a video published on his YouTube channel on Monday, addressed to Army Chief General Qamar Javed Bajwa, Khan alleged that actors within the military were threatening him for questioning the military’s role in political affairs.

Attock police arrested Khan the following day in Islamabad in response to a complaint filed by a man identified as Malik Mureed Abbas, citing an unspecified video on social media that featured Khan, according to news reports.

CPJ was unable to find any contact information for Abbas. Khan’s lawyer Mian Ali Ashfaq told Dawn that the journalist had been named in 17 separate cases across Punjab. When reached via messaging app, Ashfaq told CPJ that he was unable to immediately comment.

On Wednesday, Dawn reported that Khan had been accused of violating several sections of Pakistan’s penal code, including defamation and publication of statements conducive to public mischief, as well as various sections of the 2016 Prevention of Electronic Crimes Act.

According to the penal code, those offenses can carry prison sentences of two to seven years and an unspecified fine. That Dawn report said a court had ordered authorities not to pursue charges under the PECA.

On Thursday, a court ordered Khan to be released, but police immediately re-arrested him as part of an investigation that is “sealed” and the details of which have not been made public, according to The Express Tribune.

CPJ emailed Sarfraz Hussain, a spokesperson for Pakistan’s Embassy in Washington, D.C., and the Punjab police for comment, but did not receive any replies. CPJ also contacted Ambreen Jan, director general of the external publicity wing of the Ministry of Information and Broadcasting, via messaging app, but did not receive any response.