DubaI: An appeals court in Bahrain upheld a six-month jail sentence against prominent dissident Nabeel Rajab on Thursday for a tweet deemed insulting to the kingdom’s security establishment, state news agency BNA said.

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

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

He has accused the government of repression and torture. The tweet at the centre of his case accused authorities of not tackling the threat of hardline militant groups like Daesh.

Bahrain has been in turmoil for 18 months, with the opposition agitating for democratic reforms.

The kingdom denies discrimination and says it has rolled out reforms and monitoring for abuses by the security forces.

In an open letter to the New York Times last month, Rajab urged greater freedom of expression in Gulf countries.

Rajab was 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 overturned, but only after Rajab had already served his sentence.