Malaysia has said it has agreed to release the body of Kim Jong-nam to North Korea in exchange for the return of nine Malaysians held in the North’s capital.

Relations between Malaysia and North Korea have been badly frayed by the murder of the North Korean leader’s half brother at Kuala Lumpur’s airport. Both countries withdrew their ambassadors and North Korea blocked nine Malaysians from leaving the country. Malaysia responded in kind, barring North Koreans from exiting its soil, including three suspects believed to be hiding in the North Korean Embassy.

Following negotiations that he described as “very sensitive”, Malaysian Prime Minister Najib Razak said that North Korea had allowed the nine Malaysians to leave, and that Malaysia had agreed to release Kim’s remains to North Korea. He didn’t say whether Kim’s body had already left Malaysia.

Earlier, a van was seen leaving the morgue where Kim’s body was being held, after which police guards were removed.

Mr Najib said in a statement that Malaysia would also “allow North Koreans to leave Malaysia” as part of the agreement. It wasn’t clear whether that included the three suspects wanted by police. The three include an embassy employee and an Air Koryo worker. Four other North Korean suspects left the country on the day Kim was killed.

“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, the coroner has approved the release of the body,” Mr Najib said.

Kim Jong-nam was killed walking through the airport on 13 February (Reuters)

North Korea’s official Korean Central News Agency confirmed the agreement, saying the two sides had pledged to “guarantee the safety and security” of each other’s citizens, and that Malaysia had agreed to transfer the body “to the family of the deceased” in North Korea. Kim, however, is believed to have children with women living in Macau and Beijing, not in North Korea.

Government officials couldn’t immediately be reached for further details.

Custody of the body had been a flashpoint as relations between Malaysia and North Korea deteriorated sharply.

Kim was poisoned on 13 February in a crowded terminal at the airport. According to Malaysian investigators, two young women approached Kim as he waited for a flight and smeared VX nerve agent – a banned chemical weapon – on his face. He was dead within 20 minutes. North Korea, which is widely suspected to be behind the attack, has rejected the autopsy findings.

Experts say the VX was almost certainly produced in a sophisticated state weapons laboratory, and North Korea is widely believed to possess large quantities of chemical weapons.

North Korea has denied any role in the killing and denounced the investigation as flawed and politically motivated. North Korea does not even acknowledge the victim is Kim Jong-nam, referring to him instead as Kim Chol, the name on the passport he was carrying when he died.

North Korea had demanded custody of the body because the victim was one of its citizens. But Malaysia refused, in part because it needed to formally identify the body, which it now says it has done, using DNA from his son.

The two women accused of wiping Kim’s face with the poison have been charged with murder. The two – an Indonesian and a Vietnamese – say they were duped into thinking they were taking part in a hidden-camera prank TV show.