Jordanian author Nahed Hattar was shot dead outside a court in Abdali district on Sunday, national news agency Petra reported. Hattar, who was charged for sharing a cartoon that allegedly offended Islam, was hit by three bullets minutes before he was scheduled to go on trial at the Palace of Justice in Amman. The shooter was reportedly arrested and an investigation is under way.

On August 13, the 56-year-old was arrested for posting a caricature on Facebook of a bearded man smoking in bed with women in heaven and asking God to bring him wine and cashews. He was accused of inciting sectarian strife and offending Islam but was released on bail in September, Al Jazeera reported.

Hattar, a Christian, had issued a public apology saying he had not intended to insult God, but that he had shared the cartoon to scorn Islamic extremists and their vision of heaven, according to Reuters. He had alleged that his Islamic opponents were using the cartoon to seek revenge against him. Officials said the writer was a supporter of Syrian President Bashar al-Assad.

The country – a member of the United States-led coalition that is fighting the Islamic State group in Iraq and Syria – was recently targeted in a suicide bombing that killed seven security personnel.