The body of Kim Jong-nam, half brother of North Korea's leader, has been released to the communist country, ending a drawn-out diplomatic drama over his murder with VX nerve agent at a Malaysian airport.

Malaysian Prime Minister Najib Razak said in a statement on Thursday the coroner approved the move "following the completion of the autopsy on the deceased and receipt of a letter from his family requesting the remains be returned to North Korea".

Kim was assassinated at Kuala Lumpur's airport on February 13 after the chemical weapon was smeared on his face by two women, according to Malaysian authorities.

An Indonesian woman and Vietnamese woman have been charged with murder.

The attack outraged Malaysia and sparked the diplomatic row with North Korea, resulting in travel bans on both sides and a collapse in long-standing friendly ties.

READ MORE: Kim Jong-nam - N Korea accuses US and S Korea of murder

Najib also said nine Malaysians barred from leaving North Korea because of the row had been allowed to board a plane to leave Pyongyang, adding on Twitter that it was expected to reach Kuala Lumpur at 5am Malaysian time (2100 GMT).

North Korean citizens in Kuala Lumpur will also be allowed to return home, he said.

"I had a deep personal concern about this matter, and we worked intensively behind the scenes to achieve this successful outcome," Najib said.

"Many challenges were overcome to ensure the return of our fellow Malaysians. The safety and security of our citizens will always be my first priority."

OPINION: Kim Jong-nam attack reveals true nature of North Korea

Sufian Jusoh, a senior fellow at the Institute of Malaysia and International Studies, told Al Jazeera from Kuala Lumpur that it was the end of the diplomatic spat, but it would not bring the previously strong relationship "back to normal".

"The fact that Malaysian diplomats have left North Korea means that's the end of diplomatic representation," he said. "Therefore this will cause a huge delay in Malaysia's effort to penetrate the North Korean trade market."

VX nerve agent

A joint statement by the North Korean government released simultaneously said both countries managed to "resolve issues arising from the death" at a meeting in Kuala Lumpur.

"The importance of bilateral relations was reaffirmed. In this connection, both countries agreed to positively discuss the re-introduction of the visa-free system and work towards bringing the relations to a higher level," said the statement from North Korea.

Malaysia imposed a travel ban on North Koreans leaving the Southeast Asian country in a tit-for-tat move after Pyongyang barred Malaysians from leaving its borders.

North Korea was angered by Malaysian authorities, who identified North Korean suspects and wanted to question others, including a diplomat at its embassy in Kuala Lumpur.

Pyongyang has maintained that the body was that of Kim Chol as stated in his passport, and not Kim Jong-nam. It also denied any responsibility in the killing.

Kim, the eldest son of the late North Korean leader Kim Jong-il, had spoken out publicly against his family's dynastic control of the isolated, nuclear-armed nation - now ruled by his younger brother Kim Jong-un.

He lived in exile in Macau.