But an opposition political party and a rights group quickly condemned the remarks and said that Hamza Kashgari was deported because he was on a Saudi watchlist of young pro-democracy activists who had voiced support for the Arab Spring uprisings.
"Do not look at Malaysia as a safe transit country or a safe haven for those who are wanted by their country of origin," Malaysian Home Minister Hishammuddin Hussein told a news conference earlier.
Kashgari, 23, was detained in Malaysia last week after fleeing Saudi Arabia in fear for his life after a Twitter post about the prophet sparked outrage.
Insulting the Prophet Mohammed is considered blasphemous in Islam and is a crime punishable by execution in deeply conservative Saudi Arabia.
Human rights groups had warned that deporting Kashgari would be akin to a death sentence and urged Muslim-majority Malaysia to free him, but Kashgari was repatriated Sunday in the custody of Saudi officials.
"I will not compromise. Do not think you can just come in and go out of Malaysia. Do not ever look at Malaysia as a safe-transit country. We cannot champion rights just for the sake of rights," Hishammuddin said.
The minister said Kashgari had been detained at the request of Saudi authorities and denied a Malaysian police official's earlier claim that Interpol was also involved.
N. Surendran, vice-president of Keadilan political party, said Kashgari was a victim of political persecution by the Saudi authorities.
"Kashgari and others of the Saudi youth movement have been in support of the people of Syria in their uprising against the cruel (Syrian President Bashar) al-Assad's regime," he said.
Echoing the comments, rights group Lawyers for Liberty said Kashgari belongs to a group of emerging young pro-democracy activists which had supported the Arab Spring.
"The cold hard truth is that Malaysia has bent over backwards to please Saudi Arabia, breached international law by not allowing Hamza to seek asylum and instead handed him on a silver platter to his persecutors and condemned him to torture and near certain death," it said.
Referring to the prophet, Kashgari had tweeted: "I have loved things about you and I have hated things about you and there is a lot I don't understand about you.
"I will not pray for you."
Malaysia has no formal extradition treaty with Saudi Arabia and Kashgari's deportation has been condemned by rights groups.
Malaysian rights activist Fadiah Nadwa Fikri, one of a group of lawyers that obtained a court order on Sunday to block the deportation, said the government "illegally" circumvented the order.
"We believe that when they knew we got the court order, they quickly deported him. The government is now trying to legitimise its illegal and unconstitutional action to deport Kashgari," she said.
Human Rights Watch said the deportation "sets all-new lows in the Malaysian government's failure to respect human rights standards, and if he faces execution back in Saudi Arabia, the Malaysian government will have blood on its hands".