Two United Nations employees, who were among 11 Malaysian nationals stranded in North Korea following a travel ban, have left the country.

Prime Minister Najib Abdul Razak confirmed that the two, who work for the World Food Programme, had arrived in Beijing.

"Alhamduillah (Thank God). Two of our citizens under WFP, Stella Lim and Nyanaprakash Muniandy, were allowed to leave Pyongyang and have arrived in Beijing," he said in a Twitter posting.

Alhamdulillah. 2 of our citizens under @WFP , Stella Lim & Nyanaprakash Muniandy, were allowed to leave Pyongyang & hv arrived in Beijing — Mohd Najib Tun Razak (@NajibRazak) March 9, 2017

The other Malaysians still in North Korea comprise three diplomatic staff and and six family members.

Najib also revealed that he spoke on the telephone with the counsellor of the Malaysian embassy in Pyongyang, Mohd Nor Azrin.

“I would like to update that he, his family along with all of the other Malaysians in North Korea are safe, Alhamdulillah.

"I have given him my assurance that the government will do everything we can to ensure that they return home safely soon. The whole of Malaysia is praying for them," he said.

“Even though they are refrained from leaving the country, the North Korean government have assured us of their safety and they are free to go about their daily lives.

"The government will continue to work on reaching the best solution on this issue. Let us all pray for the best,” he added.

The prime minister said he has also requested mosques nationwide to conduct prayers for the Malaysians in North Korea.

WFP spokesperson Zhang Yiwen was quoted by the New York Times as saying that the two Malaysians were not bound by the travel restriction as they were international representatives and not that of the Malaysian govenrment.

The WFP in a statement said the two Malaysians "are international civil servants and not representatives of their national government", according to the BBC.

Meanwhile, AFP quoted a government official as saying that Malaysia did not play a role in securing the release of the pair as they held UN travel documents.

Pyongyang on Tuesday banned Malaysians from leaving North Korea until the issue of Kim Jong-nam's murder is properly resolved.

This came after Wisma Putra ordered North Korean ambassador Kang Chol to leave the country for accusing Malaysia of conspiracy to blame his country for the murder.

Najib had condemned North Korea's move as tantamount to holding Malaysians "hostage" and imposed similar measures against North Koreans in Malaysia.

Diplomatic relations between the two countries became strained following the murder of Jong-nam, the estranged half-brother of North Korean leader Kim Jong-un, at Kuala Lumpur International Airport 2 (KLIA 2) on Feb 13.

Police have charged two women, an Indonesian and a Vietnamese national, over the murder.

The two were accused of smearing the deceased's face with VX nerve agent as he waited to board a flight to Macau.

Police believe four North Korean men were the main suspects but have since fled the country.

Police released another North Korean chemist Ri Jong-chol after failing to secure sufficient evidence to charge him.

Pyongyang is demanding the return of Jong-nam's body but Malaysia indicated that it would release the body to Jong-nam's next-of-kin.