North Korea has barred Malaysians from leaving the country, sparking tit-for-tat action by Malaysia, as police investigating the murder of Kim Jong-nam sought to question up to three men hiding in the North Korean embassy.

After Pyongyang announced the move, Malaysia Prime Minister Najib Razak swiftly called for the immediate release of its citizens, instructing police "to prevent all North Korean citizens in Malaysia from leaving the country until we are assured of the safety and security of all Malaysians in North Korea".

"This abhorrent act, effectively holding our citizens hostage, is in total disregard of all international law and diplomatic norms," Najib said in a statement, adding that he had called an emergency meeting of the National Security Council.

The North's foreign ministry notified the Malaysian embassy in Pyongyang of the reason for the ban and said it had hoped the case would be swiftly and fairly resolved in order to develop bilateral ties with Malaysia, the North's KCNA news agency reported.

"All Malaysian nationals in the DPRK will be temporarily prohibited from leaving the country until the incident that happened in Malaysia is properly solved," the official Korea Central News Agency said on Tuesday, citing the foreign ministry.

Malaysian Deputy Foreign Minister Reezal Marican told reporters that there were 11 Malaysians in North Korea: Three at the embassy, two UN workers and six family members.

Al Jazeera's Florence Looi, reporting from Kuala Lumpur, said Marican also said the government will need to check the exact numbers because some Malaysians might be in the country on approved tours or some other business.

"Initially, we were told Malaysian government's ban only affected the North Korean embassy staff and officials. But through the prime minister's statement, it's clear that it extends to all North Koreans in the country."

Pyongyang and Kuala Lumpur had unusually strong links for years, but have been set at loggerheads following the assassination of King Jong-nam by two women using VX nerve agent.

READ MORE: Kim Jong-nam suspect accuses Malaysia of conspiracy

Seoul has blamed Pyongyang for the assassination and Kuala Lumpur has sought several North Koreans for questioning, although the only one it arrested was released for lack of evidence.

According to KCNA, Pyongyang's foreign ministry expressed hopes that the Malaysian government would solve the issue in a "fair and timely manner based on goodwill".

The North has yet to confirm the dead man's identity, but has denounced the Malaysian investigation as an attempt to smear it.

Malaysia expelled the North's ambassador as diplomatic tensions soared, and Pyongyang retaliated late Monday by formally ordering out his counterpart - who had already been recalled for consultations.

Malaysian diplomats and nationals in the North would be allowed to "conduct business and live normally" while the travel ban is in place, it added.

Earlier, Malaysia decided to cancel visa-free entry for North Koreans entering the country. North Koreans are now required to obtain a visa as of March 6 before entering Malaysia for national security reasons, state news agency Bernama reported on Thursday, citing the deputy prime minister, Ahmad Zahid Hamidi.