Abu Dhabi // A Jordanian writer was on Sunday charged with offending Islam after he shared a cartoon depicting God and heaven that sparked anger in the kingdom.

Nahed Hattar, a newspaper columnist, had been detained on Saturday after he reposted the image on his Facebook page.

The cartoon, the origins of which are unclear, lampooned how extremists view the afterlife, but immediately sparked accusations of blasphemy and distorting the image of Islam.

Hattar, a leftist writer known for his critical views against Jordanians of Palestinian origin and a staunch supporter of the Assad regime in Syria, shared the cartoon to his Facebook page on Friday.

The cartoon depicts God with a white beard talking with an extremist who is lying in bed. Depictions of God are considered an insult.

Amman public prosecutor, Judge Abdullah Abul-Ghanam, said Hattar was charged with inciting sectarian strife and racism and insulting religion. He was remanded in custody pending further investigation.

Hattar could face up to three years in prison. The prosecutor also banned media coverage of the case in Jordan.

After Hattar shared the cartoon, social media users quickly circulated a hashtag saying “Hattar does not represent us” and demanded that legal action be taken against him.

One user slammed Hattar, who is in his 50s, on Twitter saying his “likes” will lead to the destruction of the country.

Another wrote: “Look at how far things have reached, a writer [mocking] God and heaven. I swear if you do not punish him, God will punish us if we remain quiet.”

Prime minister Hani Al Mulki ordered an investigation on Friday and the governor of Amman issued an arrest warrant. Hattar, who has written for newspapers in Jordan and Lebanon, first went into hiding but turned himself in on Saturday.

The controversy struck a chord in Jordan as the country tries to sidestep the sectarian tensions and violence that have engulfed the region.

On Saturday, Jordan’s Ifta’a Department, which issues religious edicts for the government, said the writer had exploited the calls against terrorism to attack religion.

“What has been published is fomenting hatred and sowing discord in the country,” the department said.

The Muslim Brotherhood, the main opposition force in Jordan, described the cartoon as a “provocation for every Jordanian” that “harms the country’s constitution”.

Hattar deleted his Facebook page following the backlash but before doing so said those who attacked him had missed the point of the cartoon. He denied that he was defaming religion, saying he did not mean to insult God and that the cartoon was satirising how terrorists view God and heaven.

Some analysts said the public backlash – which comes at a time when the region is witnessing growing religious conservatism – was excessive.

“There is no doubt that sharing the cartoon is a violation of the law but the public reaction was exaggerated and indicates that people here and in the region are becoming extremely religious,” said Oraib Al Rantawi, general director of Al Quds Centre for Political Studies. “It makes it sound as if Islam which is the widest spread religion is under threat and this is a worrying sign. But sometimes the reaction is worse than the action itself.”

Mr Al Rantawi warned that because Hattar is Christian, some hardline groups might seek to exploit the case to sow discord between the faiths.

“The case should be dealt with the utmost wisdom to avoid any impact that will undermine the social fabric and the national unity,” Mr Al Rantawi said.

Tensions between Christians and Muslims in Jordan are rare but Saleh Arabiyyat, a columnist with Jordan’s Al Ghad newspaper wrote that while the kingdom is an example of religious coexistence, one post or caricature exposes how fragile those ties are.

“By attacking personal posts, we need to assess the level of danger,” he wrote. “It is our responsibility as individuals to safeguard this country from discord.”

Adam Coogle, an Amman-based Middle East researcher at Human Rights Watch, said: “It is unfortunate the government would spend its time and efforts on such a case when there are real problems in the region.

“Restrictions that the government can place on free expression are limited to preventing incitement to hatred, to violence, or incitement to discrimination,” he said. “I don’t think anyone would seriously argue that re-posting the caricature would qualify as any of these.”