A court in Saudi Arabia has sentenced a man to ten years in prison and 2,000 lashes for expressing his atheism on Twitter.

The 28-year-old reportedly refused to repent, insisting what he wrote reflected his beliefs and that he had the right to express them.

The hardline Islamic state’s religious police in charge of monitoring social networks found more than 600 tweets denying the existence of God, ridiculing Koranic verses, accusing all prophets of lies and saying their teaching fuelled hostilities.

He was sentenced under a controversial law that defines atheism as “terrorism”.

In 2014 the late King Abdullah issued a string of royal decrees aimed at clamping down on all forms of political dissent and protests that could “harm public order”.

Article One of the new provisions defined terrorism as “calling for atheist thought in any form, or calling into question the fundamentals of the Islamic religion on which this country is based”.

Joe Stork, deputy Middle East and North Africa director of Human Rights Watch, said at the time the new measures were introduced: “Saudi authorities have never tolerated criticism of their policies, but these recent laws and regulations turn almost any critical expression or independent association into crimes of terrorism.”

This story first appeared in The Sun.