"(We're) very happy to be with our family members, our loved ones," said Mohd Nor Azrin Md Zain, an official who worked at the Malaysian embassy in Pyongyang.
"I would like to thank the government of Malaysia for putting so much effort to bring us back home and also all the relevant parties involved in this negotiation with the DPRK (Democratic People's Republic of Korea) side."
As part of the deal negotiated between the two governments, the body of the slain half brother of North Korean leader Kim Jong Un would be allowed to return to North Korea.
Malaysian Prime Minister Najib Razak said in a statement that would happen after Malaysia receives a letter from Kim's family requesting his repatriation.
Kim Jong Nam was killed with a highly toxic nerve agent on February 13 while waiting for a flight from Malaysia's Kuala Lumpur airport to the Chinese territory of Macau.
Malaysia has issued arrest warrants for a number of North Koreans, but North Korea has denied any involvement in the alleged murder. Two women from Indonesia and Vietnam have been charged with murder.
Four Malaysian diplomats and their family members had been stuck in North Korea since earlier this month, when both countries announced a freeze on departures amid a diplomatic row.
Relations between the two countries soured after Malaysian investigators refused to return Kim's body to Pyongyang, and instead conducted an autopsy that revealed Kim had been murdered.
Malaysian Foreign Minister Anifah Aman was on hand to greet the citizens Friday at Kuala Lumpur International Airport.
"I would like to thank the Prime Minister for placing his trust in the Ministry of Foreign Affairs to lead the negotiations with the Democratic People's Republic of Korea," Aman said. "In doing so he has placed his trust in diplomacy."
Two women face murder charges
Two women face murder charges for allegedly wiping Kim's face with VX nerve agent, which caused his death within 20 minutes.
Siti Aisyah, an Indonesian national, and Doan Thi Huong, of Vietnam, were caught on closed-circuit security cameras rubbing a substance on Kim's face before running away.
Both women say they believed they were taking part in a prank TV show
, a claim vehemently denied by Malaysian police. If found guilty, the two women face a mandatory death sentence, which in Malaysia is carried out by hanging.
Malaysia and North Korea's previously cordial ties quickly fell apart
following Kim's public killing.
North Korean authorities were quick to attack the Malaysian investigation, with their ambassador Kang Chol accusing the country of being "in collusion with South Korea"
and ignoring their requests for an immediate release of the body.
Razak, the Malaysian Prime Minister, described the ambassador's statement as "totally uncalled for."
"It is incumbent upon us to find out the truth about the crime and they should help us ... That is more important than making sweeping and baseless statements," he said.
Soon, both countries had expelled the others' ambassadors. Then on March 7, four of Malaysia's diplomats and their families were barred from leaving North Korea.
In response, Malaysian leaders banned North Koreans from leaving their country, leading to a three-week diplomatic standoff.