Dubai: Bahrain has freed prominent dissident Nabeel Rajab more than two months into a six-month jail term for insulting the authorities, citing health reasons, official news agency BNA said.

King Hamad Bin Eisa Al Khalifa issued a royal decree granting Rajab, one of the Arab world’s best-known democracy activists, a special pardon, the agency reported late on Monday.

An appeals court in Bahrain in May upheld a six-month sentence imposed for a tweet published in September 2014 deemed insulting to the kingdom’s security establishment.

He was convicted of “publicly insulting two government bodies”, the attorney-general’s office was quoting as saying at the time, referring to the defence and interior ministries.

In one of the messages deemed offensive, Rajab charged that many Bahrainis fighting with militants in Syria were former Bahraini security forces personnel who had developed extremist views while in service.

At the time of his appeal, Rajab was already in jail for posting comments on Twitter denouncing alleged torture in a prison where Shiite activists are held.

Rajab has been a leading figure in democracy protests by the island kingdom’s opposition since the 2011 Arab Spring uprisings.

Bahrain has experienced sporadic turmoil since demonstrators took to the streets that year demanding reforms and a bigger role in government. That revolt was put down with military help from Saudi Arabia.

“The release of Rajab is welcome news, but he should never have been jailed in the first place,” Brian Dooley of Human Rights First said in a statement.

Rajab was freed in May 2014 after serving a two-year jail sentence for his role in the protests. Rajab was also sentenced to three months in jail in 2013 in a separate case over a tweet criticising the prime minister, the king’s uncle. The ruling was quashed, but only after Rajab had already served his sentence.