Sentenced to death: Palestinian artist Ashraf Fayadh. Credit:AP According to Human Rights Watch, which is closely monitoring the case, Mr Fayadh was charged with blasphemy, spreading atheism and having an illicit relationship with women, based on pictures found on his phone. He told the court the pictures were of women he had met at an art gallery. A copy of the court's ruling obtained by The Associated Press sheds some light into how judges came to issue the death sentence. Mr Fayadh's friends had submitted testimony disputing the veracity of a complaint filed to the religious police by an acquaintance who accused him of making blasphemous comments about God, the prophet Muhammad and the Saudi state during a heated discussion at a cafe in Abha, the south-western city where the case was heard. The one-page court document says their testimony was not accepted in the retrial because the defendant's own "admission is the strongest evidence", without specifying what Mr Fayadh admitted to. He was arrested and released within a day for that argument in August 2013, Human Rights Watch says.

Protests against the punishment for Saudi blogger Raif Badawi in February, 2015, in Vienna, Austria. Credit:AP Just days earlier, Mr Fayadh's friends say he may have caught the attention of religious police when he filmed one of them slapping a man on the face and forcibly pinning him against a wall in Abha. The video on YouTube has been viewed nearly 195,000 times. While judges in the initial trial accepted Mr Fayadh's repentance for anything deemed offensive to religion in his poetry book, judges in the retrial said the case was considered an instance of hadd – specific crimes, such as apostasy, that have fixed punishments in Islam. Sharia is open to various interpretations, and many Muslim clerics say the death penalty is not the standard punishment for someone who leaves the faith or is an apostate, sourcing it to the prophet Muhammad's pardon of a Muslim who had renounced Islam. Saudi Arabia's ultra-conservative teachings of Islam, known as Wahhabism, have drawn comparisons to some of the ideologies underpinning the Islamic State, which executes non-Muslims and Muslims alike for criticism of the faith. In Saudi Arabia, however, there are no known cases in recent years of executions for apostasy, though 152 people have been executed this year for crimes such as murder, rape and drug smuggling, according to Amnesty International.

Saudi sharia courts can issue discretionary judgments on a wide number of crimes, which also gives way to leniency. But in crimes of hadd, even the Saudi king cannot issue a pardon, though he can interject if there are questions around how the case was handled, according to Human Rights Watch researcher Adam Coogle, and Mr Fayadh's friends who are familiar with the case. In a separate case that drew widespread condemnation, including from Saudi Arabia's closest Western allies, Saudi blogger Raif Badawi​ was publicly flogged 50 times this year and is serving a 10-year sentence for criticising the kingdom's powerful religious establishment online. The judges in Mr Fayadh's retrial sentenced him to death after one hearing, whereas the first trial lasted six hearings, Mr Coogle said. Nowhere in the court's second judgment did it state what Mr Fayadh said that was allegedly insulting to God and religion. "It's really up to the whim of judges in these cases," Mr Coogle said. Mr Fayadh's brother-in-law, Osama Abu Raya, was quoted on the Saudi al-Watan news website this week describing the artist's 2008 Arabic poetry book, Instructions Within, as a compilation of his thoughts as a young man. He said the book was not widely published. The court began assessing the book only last year after the man who filed the complaint against him also mentioned his poetry to the religious police. Then a fatwa council, which issues religious edicts, was asked to analyse it.

The 35-year-old had been better known for his role in the modern art world, curating an exhibition of Saudi artists at the 2013 Venice Biennale. He also curated a show in Saudi Arabia called Mostly Visible, which was visited by the director of London's Tate Modern, Chris Dercon. He produced Saudi artist Ahmed Matar's presentation, Word Into Art, at the British Museum in 2005. Mr Matar said Mr Fayadh's poetry book was about Palestinian issues. He said Mr Fayadh, who was born and raised in Abha, "is in a weak position" because he is Palestinian and does not have the backing of a powerful Saudi tribe to mediate. In a statement, the Palestinian Authority in the Israeli-occupied West Bank publicly appealed to Saudi Arabia to release him. The Saudi government's human rights body says it sent representatives to meet Mr Fayadh in prison in Abha, where he has been under arrest since January 2014. Mr Fayadh's case will likely be bumped back to the appeals court and then to the Supreme Court for a final ruling.

"He's not an atheist. He is a Muslim artist and poet ... He's very sensitive, he's very intelligent. He's a very good friend to major artists," said Stephen Stapleton, founding director of the London-based Edge of Arabia, which promotes Saudi artists. "The reality of art is you're going to have cases like this," he added. AP Follow FairfaxForeign on Twitter Follow FairfaxForeign on Facebook