If hunger pangs hit in the North Korean capital of Pyongyang, a ravenous resident could hail a taxi, head to a supermarket and stock up on Maggi noodles, Milo and Julie's biscuits - all produced in Malaysia.

The snacks, and the North Korean taxi manufactured by the Southeast Asian nation's carmaker Proton, exemplify the close relations - both legal and illegal - between the two nations over the years.

Those ties have unravelled spectacularly in barely three weeks after the lethal poisoning of Kim Jong Nam, the half-brother of North Korea's leader Kim Jong Un, with the highly toxic VX nerve agent in Kuala Lumpur airport.

Angry exchanges over allegations North Korean agents orchestrated the murder and the expulsion of North Korea's envoy in Kuala Lumpur escalated on Tuesday into a temporary ban on all Malaysians leaving North Korea.

Among the 11 Malaysians in the country hit by the ban are three embassy officials and their six family members, a clear breach of the Vienna Convention that governs diplomacy, according to professor of international law at the Australian National University, Don Rothwell.

"I'm not aware of situations where other states have retaliated like North Korea has today," said Rothwell.

THIRD WORLD CHAMPION

Malaysia established diplomatic relations with North Korea's totalitarian regime in 1973. Ties greatly expanded under former Malaysian leader Mahathir Mohamad.

"At that time the U.S. and other Western nations were active in criticising him about human rights," said Oh Ei Sun, a senior fellow at Singapore's Nanyang Technological University.

"He tried to deflect that by presenting himself as champion of the Third World ... he didn't care about the ideology of these countries. North Korea, Cuba, Libya - it didn't matter."

Mahathir's United Malays National Organisation (UMNO), which still rules Malaysia, begun forging links with the Workers' Party of Korea during the 1990s, said Mustapha Ya'akub, then a secretary in UMNO's youth wing.

Even as international sanctions tightened amid growing alarm at North Korea's nuclear weapons and long-range ballistic missile programs, Malaysia remained relatively sanguine.

While neighbour Singapore ended its visa-free arrangement for North Koreans last year after the latest, toughest round of United Nations sanctions, Malaysia maintained the deal.

In exchange, Malaysians were free to travel to North Korea without a visa, the only nation given that privilege by the reclusive communist dictatorship.

In recent years, North Koreans have worked in mines and construction projects and set up businesses in Malaysia. Scores of North Korean students attended Kuala Lumpur's HELP University, which bestowed an honorary doctorate in economics on Kim Jong Un in 2013 for "untiring efforts for the education of the country and the well-being of its people."

Little over three months ago, the chief executive of Malaysia's External Trade Development Corporation, Dzulkifli Mahmud, boasted that North Korea was "now looking at using Malaysia as a gateway to Southeast Asian markets".

That looks problematic now. Malaysia's cabinet was set to discuss trade relations with the North on Friday in the wake of the deterioration in ties.

ILLICIT BUSINESS

Two-way trade was a tiny $4 million in 2016, according to Malaysian figures. The data, however, likely masks the true figure. Much of the trade to North Korea goes through intermediaries in China, say experts.

And illicit business activities don't register in the trade figures.

A U.S. state department cable obtained by Wikileaks revealed two senior officials travelled to Kuala Lumpur in 2009 to warn its banks that sanctioned North Korean arms firms Tanchon and KOMID held accounts in Malaysia.

Last week, Malaysia said it would investigate North Korea front companies after a Reuters report showed that North Korea's spy agency was running an arms network in the country.

"I don't think Malaysia went out of its way to help North Korea circumvent these sanctions," said Oh. "Essentially we just gave them a lot of leeway doing business. Unless a western intelligence agency gave us a concrete list (of illicit companies in Malaysia), then we let them do business here."

Now, says Oh, Malaysia's approach to North Korea is not so laissez-faire.

"We are on the brink of a total break in diplomatic relations."