The Malaysian government has asked New Zealand to drop the sex charge against its envoy in the country, Muhammad Rizalman Ismail. According to official documents, Malaysia "refused" to waive diplomatic immunity.

Ismail was arrested on May 9 and was charged with burglary and assault with intent to rape a young woman after following her home in Wellington. The New Zealand government wanted Ismail to face the charges in New Zealand but the Malaysian government cited diplomatic immunity. Ismail left New Zealand a day after his arrest.

The Malaysian government appeared to have a change of heart, according to reports, and wanted Ismail to remain in New Zealand to face the sex charge. Malaysian officials said they will send Ismail back to New Zealand if it is "absolutely necessary" and if the country will request it.

On July 1, Foreign Minister Anifah Aman has confirmed in in Kuala Lumpur that the diplomat was recalled in "disgrace." He said the Malaysian government had offered to waive diplomatic immunity but New Zealand gave permission to have Ismail sent home.

According to the documents released to AAP, New Zealand's Ministry of Foreign Affairs sent a letter to the Malaysian high commission and said the charges filed against the diplomat were considered serious. The minister wanted Ismail sent back to New Zealand to stand trial for his offences.

In the letter, the ministry requested Malaysia to waive the personal immunity granted to diplomats under the Vienna Convention. The Malaysian commission had flatly refused and instead asked the New Zealand police to "kindly consider sealing all documentations pertaining to the above mentioned matter and withdraw all charges."

In exchange, the high commission will ensure Ismail will never return to New Zealand.

According to reports, the Malaysian government said its envoy will be subjected to a psychiatric evaluation before defence authorities start their internal investigation.

Muhammad Rizalman Ismail was serving as a warrant officer as part of the Malaysian high commission defence staff. He stayed in Wellington for about a year.

Prime Minister John Key has said the government did not want him to leave the country so he can face charges against him. Reports said both countries may need to stay in contact to "sort out" the next turn of events.

After observing a court suppression order, Mr Key had refused to name the diplomat charged with assault or the name of his home country. The prime minister finally revealed the diplomat's name after the suppression order was lifted.