A journalist was sentenced Tuesday to 12 years in prison by a Saudi criminal court for “disobeying the ruler” and claiming in televised remarks that the Saudi kingdom incites terrorism, state media reported.

Local media identified the convicted as Wajdi Al-Ghazzawi, who was also accused of contacting an unnamed “enemy of Saudi Arabia at the time (2009) and receiving a suspicious sum of money from it," according to SPA news agency.

Reports suggested that Ghazzawi was accused of taking money from former Libyan leader Muammar Gaddafi in 2009, a time of tension between Tripoli and Riyadh.

Ghazzawi, the court in Riyadh said, was guilty of "disobeying the ruler on a television programme, inciting sedition...discrediting the kingdom and claiming that terrorism and Al-Qaeda were created by Saudi Arabia."

He was also charged with spreading excerpts of the televised remarks on the internet and of accusing the Saudis "of insulting residents and denying them their rights," SPA reported.

The court also instituted a 20-year travel ban on Ghazzawi, in addition to barring him from appearing in any media.

Gaddafi, a long-time foe of Saudi Arabia during his four-decade rule in Libya, was killed by rebels in 2011 following the NATO-led ouster of his regime. In 2004, US and Saudi news outlets accused Gaddafi of allegedly plotting to assassinate Saudi King Abdullah, who was crown prince at the time, AFP pointed out.

On Sunday, Saudi Arabia passed a broad law that deems those that “disturb the public order” as terrorists.

It defines terrorism as “any act carried out by an offender...intended to disturb the public order…to shake the security of society…stability of the state…expose its national unity to danger…suspend the basic law of governance or some of its articles,” according to its text, as cited by Human Rights Watch.

Terrorists can also be considered those individuals who “insult the reputation of the state or its position… inflict damage upon one of its public utilities or its natural resources,” or those who attempt to force “governmental authority to carry out or prevent it from carrying out an action, or to threaten to carry out acts that lead to the named purposes or incite [these acts].”

The legislation, made up of 40 clauses, allows security forces to arrest and detain suspects for up to six months with the possibility to extend the confinement for another six months. Suspects are allowed to be held incommunicado for 90 days without the presence of their lawyer during the initial questioning.