A Kuwaiti man has been sentenced to 10 years in prison  after he was convicted of endangering state security by insulting the Prophet Mohammad and the Sunni Muslim rulers of Saudi Arabia and Bahrain on social media. Shi’ite Muslim Hamad al-Naqi pleaded innocent at the start of the trial last month, saying he did not post the messages and that his Twitter account had been hacked.

The written verdict, delivered by Judge Hisham Abdullah on Monday, found Naqi guilty of all charges, a court secretary told Reuters. The sentence was the maximum that 26-year-old Naqi could have received, his lawyer Khaled al-Shatti said.

The judge found him guilty of insulting the Prophet, the Prophet’s wife and companions, mocking Islam, provoking sectarian tensions, insulting the rulers of Saudi Arabia and Bahrain and misusing his mobile phone to spread the comments.

“The prison sentence is long but we have the chance to appeal,” Shatti said. Under Kuwaiti law, the defense can file an appeal within 20 days of the verdict and jail sentences have been reduced in the past for similar convictions.

The civil plaintiff arguing the case against Naqi, as well as some Kuwaiti politicians, had called for Naqi to be executed in a case that stoked sectarian tensions in the Gulf state. “This verdict is a deterrent to those who insult the Prophet Mohammad, his companions and the mothers of the believers,” civil plaintiff Dowaem al-Mowazry said in a text message. He had argued in court that Naqi must be made an example of.