The North Korean embassy in Beijing is a squat, beige building behind a well-guarded gate. Only two things seem remarkable here: photos of missiles proudly displayed in a glass case, and the fact that China is the sole major power that actually welcomes North Korean diplomats and officials.

At least, for now.

China's patience may be wearing thin, as frustrations double up over North Korea's development of nuclear weapons and apparent willingness to use chemical weapons.

South Korea has accused North Korean leader Kim Jong-un of ordering the assassination of his half-brother, Kim Jong-nam, and Malaysia suspects several North Korean officials may have been involved in a plot that used the banned VX nerve agent.

It's creating an unprecedented rift between the two neighbours and ideological soulmates. China's support dates back to the 1950s and the Korean war.

Chinese paramilitary officers patrol outside the North Korean embassy in Beijing in 2013. Tensions between the neighbours have risen since the killing of Kim Jong-nam in the Kuala Lumpur airport. (Mark Ralston/AFP/Getty Images)

Last week, Beijing imposed a ban on coal imports from North Korea that could deprive it of much needed foreign funds until the end of 2017. Pyongyang has replied with one of the nastiest insults one socialist state can throw at another, accusing China of "dancing to the tune of the U.S."

"The hostile forces are shouting 'bravo' over this," says a commentary published by North Korea's state news agency, accusing its neighbour of "mean behaviour."

North Korea does not have the power to confront China on any comprehensive level. - Chinese newspaper editorial

The reaction was so strong that some Chinese experts initially thought the commentary was fake.

"It came as a shock to many Chinese people," says Cheng Xiaohe, professor of international studies at Beijing's People's University. "The response was so strong, it indicates the coal bans will hurt North Korea badly."

"These are not symbolic gestures made by the Chinese government," says Cheng. "The new bans can really bite."

He also says this may be just the first of several tough new actions by China.

The semi-official Beijing tabloid Global Times reacted to the commentary with an editorial of its own, suggesting North Korea just fall in line.

"There really is no other option," says the editorial. "North Korea does not have the power to confront China on any comprehensive level."

It's a surprising turn for a friendship that has endured the idiosyncrasies of "Supreme Leader" Kim Jong-un, as well as increasing pressure on China from the United States and others to bring North Korea to heel over its weapons program.

China's friendship with North Korea has taken a surprising turn, given how long the country has endured Supreme Leader Kim Jong-un's idiosyncrasies. (Wong Maye-E/AP)

Pyongyang has defied some of the toughest sanctions imposed by the United Nations Security Council, meant to not only deprive North Korea of the parts and expertise it needs to develop a nuclear arsenal, but also to punish the country's leadership by blocking travel and access to luxury goods.

Officially, China endorses the UN sanctions and condemns Kim Jong-un's nuclear and missile sabre-rattling.

But it is walking a fine line, trying to avoid weakening the regime so badly that it collapses, causing unrest in North Korea and a possible flood of refugees into China.

Beijing has been accused of turning a blind eye to a network of North Korean shell companies and middlemen who operate just over the land border in China, working to circumvent sanctions.

North Korea and Japan used the North Korean Embassy in Beijing for talks in 2014. North Korean relations with China have hit headwinds over the country's activities with nuclear and chemical weapons. (Goh Chai Hin/AFP/Getty Images)

An upcoming UN report blames these tactics, along with transactions using bulk gold, cash and sophisticated sleight of hand to evade international banking limits and allow North Korea's weapons program to advance.

"Despite strengthened financial sanctions in 2016, the country's networks are adapting by using greater ingenuity in accessing formal banking channels," the Reuters news agency quotes the unreleased report as saying.

Poisoned cloth

Still, while Pyongyang's ongoing nuclear and missile program worries China, it's the apparent assassination of Kim Jong-un's half-brother Kim Jong-nam that has sharpened the divisions between it and North Korea.

Malaysian authorities say Jong-nam was attacked at the Kuala Lumpur airport earlier this month by two women who rubbed a cloth soaked in poison on his face. He collapsed and died shortly after.

Police identified the toxin as one of the deadliest: the banned chemical nerve agent VX.

That suggests a sophisticated international agency was behind the attack.

North Korea has denied involvement, but South Korean intelligence has pointed the finger at Pyongyang, saying it wanted Jong-nam dead because he was a critic of Jong-un and his regime.

Malaysian police have identified several North Korean suspects, including four that South Korean intelligence officials say work for North Korea's Ministry of State Security, the country's secret police. They say two others work for the North Korean Foreign Ministry. All of them have allegedly slipped out of Kuala Lumpur and returned to Pyongyang.

On Wednesday police in Malaysia said the two women would soon be charged with murder.

Stockpile of deadly toxins

China is reportedly upset because Jong-nam was under its implicit protection, living in the country's gambling enclave of Macau for years.

It was also rattled by North Korea's apparent ready use of such a potent and prohibited chemical weapon beyond its borders. Pyongyang is known to have a large stockpile of various deadly toxins, and it hasn't signed on to international conventions agreeing not to engage in chemical warfare.

"By using the banned chemicals, it makes things worse," says Cheng. "It further tarnishes its reputation and undermines its credibility and further isolates the country."

He says it also complicates a negotiated solution to any of its weapons programs.

"North Korea would not be perceived as a decent, reliable negotiating partner, but as paranoid and irrational," he says.