Image caption Mr Kashgari' has since deleted his controversial tweet about the Prophet Muhammad

The Malaysian government has defended its deportation of a Saudi journalist accused of insulting the Prophet Muhammad in a tweet

Home Minister Hishamuddin Hussein said the deportation to Saudi Arabia was legal and that Malaysia cannot be seen as a safe haven.

Hamza Kashgari, 23, was sent back to Saudi Arabia on Sunday.

Mr Kashgari's controversial tweet last week sparked more than 30,000 responses and several death threats.

Insulting the prophet is considered blasphemous in Islam and can be punishable by death in Saudi Arabia.

He has since removed the tweet and apologised for his comments.

Mr Kashgari fled Saudi Arabia and was detained when he arrived in Kuala Lumpur on Thursday.

His lawyers claimed to have obtained a court injunction to keep him in Malaysia. But the government deported him, saying that they did not receive any court order.

"I will not allow Malaysia to be seen as a safe country for terrorists and those who are wanted by their countries of origin, and also be seen as a transit county,'' Mr Hussein was quoted by the Associated Press news agency as saying.

According to the BBC's Jennifer Pak, Malaysia and Saudi Arabia do not have a formal extradition treaty. This is the reason why human rights activists say that Malaysia has violated international human rights.

Amnesty International has said that Mr Kashgari is a "prisoner of conscience".

"If he (Kashgari) faces execution back in Saudi Arabia, the Malaysian government will have blood on its hands," said Phil Robertson, Asia deputy director of Human Rights Watch.