BAKU (Reuters) - An Azeri opposition blogger was released on Saturday after serving two years in prison in a case condemned by human rights activists.

Mehman Huseynov, who posted critical articles about corruption in the ex-Soviet country, was jailed in January 2017 and sentenced to two years in prison for alleged libel.

The West has criticized Azerbaijan for what it calls intimidation and repression aimed at the opposition and urged Baku to comply with its pledges on human rights. Azeri officials deny the accusations.

“I will continue to serve the free media,” Huseynov told reporters after being released from prison.

Huseynov faced new criminal charges of allegedly attacking a prison officer in December and could face up to seven more years in prison if convicted.

Azeri officials dropped those charges in January after Huseynov went on a hunger strike and wrote to President Ilham Aliyev with a request for him to intervene.

Aliyev has ordered another investigation, while human rights activists and the opposition held protests in Baku.