Kim Jong-Nam was killed with the lethal nerve agent VX on February 13 at Kuala Lumpur airport, triggering a major clash between Malaysia and North Korea, which saw them expel each other's ambassadors and bar citizens from leaving.
But a deal announced by Malaysian Prime Minister Najib Razak and confirmed by North Korean state media on Thursday said the two countries had lifted their respective travel bans, and Kuala Lumpur would send Kim's body to North Korea.
There were emotional scenes as they were embraced by tearful relatives who had also gathered to meet them.
Mohamad Nor Azrin, counsellor of the Malaysian embassy in Pyongyang, said that while they had not been threatened and were free to move around they were not allowed to leave.
More From This Section
"We were very concerned because we had done no wrong. But we had to keep our spirits up," he told reporters.
The Malaysians were flown out on a government-owned business jet piloted by a senior Royal Malaysian Air Force officer.
Lieutenant Colonel Hasrizan Kamis said the Bombardier jet left for Pyongyang from a Malaysian airbase yesterday, apparently after talks reached a breakthrough.
The jet turned around in the evening with the nine on board, making a two-hour refuelling stop in the southeastern Chinese city of Fuzhou.
"There was a feeling of nervousness until we exited North Korean airspace," Kamis told AFP. "Everyone felt relieved."
He had earlier announced that the body was being sent back "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".
He did not specify who in the family had made the request. Kim's wife and children, who were living in exile in the Chinese territory of Macau, are believed to be in hiding after the murder.
On Friday, foreign minister Anifah confirmed the body was on its way back to North Korea after being kept in a hospital morgue in Kuala Lumpur for more than six weeks.