DUBAI- A Saudi court has commuted the death sentence against a Palestinian poet on charges of apostasy and abandoning his Muslim faith to eight years in jail and 800 lashes, his lawyer said.Ashraf Fayadh was detained by the country's religious police in 2013 in Abha, southwest Saudi Arabia, and rearrested and tried in early 2014.The new ruling, posted by Fayadh's lawyer, Abdul-Rahman al-Lahim, on his Twitter account said that the court has decided to "go back on the previous death sentence" but confirmed the charges that had prompted the death penalty."The accused is sentenced to a punishment of eight years in jail and 800 lashes divided into installments, 50 lashes for each installment," the ruling stated, according to the Twitter posting.A spokesman for Saudi Arabia's justice ministry could not immediately be reached for comment.Fayadh's conviction was based on evidence from a prosecution witness who claimed to have heard him cursing God, Islam's Prophet Mohammad and Saudi Arabia, and the contents of a poetry book he had written years earlier.A lower court had previously sentenced Fayadh to four years in prison and 800 lashes. The case went to the Saudi appeals court and was then returned to the lower court, where a different judge last November 17 increased the sentence to death. The second judge ruled defense witnesses who had challenged the prosecution witness' testimony ineligible.Saudi Arabia's justice system is based on sharia, or Islamic law, and its judges are clerics from the kingdom's ultra conservative Wahhabi school of Sunni Islam. In the Wahhabi interpretation of sharia, religious crimes including blasphemy and apostasy incur the death penalty.Liberal writer Raif Badawi was flogged 50 times in January last year after his sentencing to 10 years in prison and 1,000 lashes for blasphemy, prompting an international outcry. Badawi remains in prison, but diplomats have said he is unlikely to be flogged again.Saudi judges have extensive scope to impose sentences according to their own interpretation of sharia without reference to any previous cases. After a case has been heard by lower courts, appeals courts and the supreme court, a convicted defendant can be pardoned by King Salman.