KUALA LUMPUR, Malaysia — A Saudi journalist was deported Sunday to his home country, where he was expected to face arrest and possibly death for writing about the Prophet Muhammad.

The journalist, Hamza Kashgari, had been detained by the Malaysian police since Thursday, when he was stopped at Kuala Lumpur International Airport at the request of the Saudi government. Mr. Kashgari, a newspaper columnist based in Jidda, had fled Saudi Arabia amid public outrage after he wrote about an imaginary meeting with the Prophet Muhammad in a series of posts on Twitter, according to news reports.

Human Rights Watch warned that Mr. Kashgari faced “almost certain conviction and a death sentence on charges of apostasy” if he was sent back to Saudi Arabia.

The Saudi king has reportedly called for his arrest, and many in the religiously conservative country have accused him of blasphemy, a capital offense in Saudi Arabia.