DHAKA, Bangladesh — When prominent Bangladeshi writer, columnist and government critic Farhad Mazhar went out to buy medicines, he was dragged into a car and taken away.

He later called his wife to say his captors were demanding 3.5 million takas ($43,290) for his freedom. But instead of paying the ransom, Mazhar was released hundreds of kilometers (miles) away and given a bus ticket to return to his Dhaka home.

In a statement before a magistrate on Tuesday, Mazhar narrated his ordeal in which police said he mentioned that “an effort to embarrass the government” could be a reason behind his abduction.

The family said that Mazhar, who is also a controversial figure tied to the opposition Bangladesh Nationalist Party, was still traumatized and receiving hospital care. He is also known as a sympathizer to hard-line Islamist groups despite his communist background. After his release, one of the hard-line groups, Hefazat-e-Islam, thanked Prime Minister Sheikh Hasina for Mazhar’s safe return.

It wasn’t clear who kidnapped him or why. The opposition blamed security agencies, but the country’s home minister praised police for their quick rescue.

Bangladesh’s intelligence and security agencies have long been blamed for disappearance and secret detentions of scores of people, mostly those connected to the opposition. Many have also been detained as suspects for their alleged involvement with radical groups. In many cases, security agencies said they have no idea who is behind abductions.

On Thursday, Human Rights Watch released a report in New York blaming the government for many of the secret detentions and disappearances of opposition figures since 2013.

In the 82-page report, the watchdog quoted witnesses and family members as saying that the country’s elite anti-crime Rapid Action Battalion or the Detective Branch of the police were behind such disappearances.

The group said at least 90 people were victims of enforced disappearance in 2016 alone.

It said while most were produced in court after weeks or months of secret detention, the group documented 21 cases of detainees who were later killed, and nine others whose whereabouts remain unknown.

The group said the 90 cases include three sons of prominent opposition politicians who were picked up over several weeks in August 2016; one was released after six months of secret detention, while the other two remain disappeared. In the first five months of 2017, 48 disappearances were reported. There are allegations of severe torture and ill-treatment in secret custody, the group said.

“The disappearances are well-documented and reported, yet the government persists in this abhorrent practice with no regard for the rule of law,” said Brad Adams, the group’s Asia director.

He said that Bangladesh security forces appear to have a free hand in detaining people, “deciding on their guilt or innocence, and determining their punishment, including whether they have the right to be alive.”

Mufti Mahmud Khan, a spokesman for the Rapid Action Battalion, told The Associated Press that the allegations were baseless.

“We don’t detain secretly, we don’t go beyond law. Whatever we do we stay within the boundary of the law,” Khans said. “When we arrest someone, we follow procedures and we duly hand him over to police for further course of legal action.”

As the case of Mazhar raised concerns, the country’s leading English-language Daily Star newspaper said in an editorial Thursday that a sense of unease has rattled the public “because apparently there are powerful gangs in the country who are not only capable of abducting an individual by whatever means and methods, but are also able to carry him across one end of the country to another with impunity.”