Although Kashgari subsequently apologised and deleted the offending tweets, it did not mollify his critics.
Amnesty International, Human Rights Watch and other organisations implored Malaysia, a largely Muslim country with a relatively tolerant reputation, not to deport him. Blasphemy carries the death penalty under Saudi Arabia's strict interpretation of sharia.
One of Kashgari's lawyers, Fadiah Nadwa Fikri, condemned the deportation as "a blatant violation of the law and human rights".
She told Agence France-Presse Kashgari's mother and brother, who had flown to Malaysia to seek his release, were distraught. "They broke down in tears. They fear for his safety," she said.
Fadiah said lawyers obtained the High Court injunction at 1.30pm and were told by police the Saudi was still in the country. But they were later informed his plane had left at 10am.
Home Minister Hishammuddin Hussein said the journalist was being repatriated under Malaysia's extradition arrangements. "The nature of the charges against the individual are a matter for the Saudi Arabian authorities."
Christoph Wilcke, senior Middle East researcher at Human Rights Watch, said Kashgari was unlikely to get a fair trial, since "Saudi clerics have already made up their mind that Kashgari is an apostate who must face punishment".
He had urged Malaysia not to deport him, saying it would make the Government "complicit" in his fate.
Malaysian human rights lawyer Edmond Bon expressed disappointment at the decision to "deport him to a potentially life-threatening punishment".
In an interview with the Daily Beast, a United States website, Kashgari had said he believed he was being made "a scapegoat for a larger conflict" between conservatives and liberals in Saudi Arabia.
Tweet trouble
Among the tweets Hamza Kashgari (above) addressed to the Prophet Muhammad were:
'On your birthday, I find you wherever I turn. I will say that I have loved aspects of you, hated others, and could not understand many more.'
'No Saudi women will go to hell, because it's impossible to go there twice.'
- Independent