According to the Jordanian state news agency Petra, a man was arrested at the scene of the shooting in the Abdali district. The government denounced the killing as a “heinous” crime.
Two witnesses said the gunman, bearded and in his 50s, was wearing a traditional Arab dishdasha, or long robe.
“He was standing at a short distance of about one metre in front of Nahed on the stairs of the supreme court,” a witness told the Associated Press.
Saad Hattar, a cousin of the victim, said: “Nahed was accompanied with two brothers and a friend when he was shot. The brothers and the friend chased the killer and caught him and handed him over to the police.”
He said the family held Jordan’s prime minister, Hani al-Mulki, responsible for Hattar’s death. “The prime minister was the first one who incited against Nahed when he ordered his arrest and put him on trial for sharing the cartoon, and that ignited the public against him and led to his killing.”
In a statement, the family called on the government to hold accountable all those who had incited violence against Hattar. “Many fanatics wrote on social media calling for his killing and lynching, and the government did nothing against them,” they said.
Hattar had insisted that he had not meant to insult Islam by posting the cartoon, but wanted to expose how Isis “envisions God and heaven”. He accused his Islamist opponents of using the cartoon to settle scores with him.
A controversial figure on the left of Jordanian politics, Hattar has faced charges before, including for insulting the country’s king, Abdullah II. He has also been a prominent supporter of the Syrian president, Bashar al-Assad, and advocated depriving Jordanians of Palestinian origin of their legal and civil rights.
Hattar’s murder is the latest in a series of recent violent incidents in Jordan, which until recently had avoided the worst of the jihadi-related violence that has affected some other Middle Eastern states even though several thousand of its citizens have crossed into neighbouring Syria to join Isis.
Late last year, a Jordanian police captain opened fire on instructors at an international police training centre in Jordan’s capital, killing at least five people, including two Americans, before being shot dead by security forces.
In June, a suicide car bomb attack near the Syrian border killed seven Jordanian soldiers.
The incidents have raised fears among diplomats and analysts over Jordan’s security after years in which the kingdom has been seen as a haven of stability.