Image copyright Reuters Image caption Chinese President Xi is, again, dealing with the crisis while in the middle of hosting an international summit

In the small Chinese city of Yanji, the ground was moving.

This Korean-speaking region sits on the border with North Korea and soon local bloggers were posting images on social media of things shaking.

What they could not have known was that this earthquake was man-made.

Not far away, the government in Pyongyang was soon declaring the successful test of a hydrogen bomb - its most powerful to date.

The timing was a clear slap in the face for Beijing.

Just hours after the underground nuclear test, President Xi Jinping was due to make a speech as the head of state for the nation hosting the Brics summit, which would welcome delegates from Brazil, Russia, India and South Africa to Xiamen.

It is conceivable that North Korea did not necessarily choose the opening day of this major diplomatic gathering for its test but it certainly did not see the need to call it off for fear of offending China.

And, what is more, these weapons test "coincidences" are now starting to mount up when it comes to Xi Jinping.

In March, just before the Chinese leader was set to meet United States Secretary of State Rex Tillerson in Beijing, North Korea announced the successful test of a new type of rocket engine.

Another coincidence?

Then in May President Xi was preparing to open the One Belt One Road forum. The leaders of dozens of nations had come to the Chinese capital to discuss economic development and transport infrastructure around the Chinese leader's signature foreign policy initiative. Then, whoooooosh! Off goes another North Korean missile test to steal the limelight before the summit could even get going.

That this could have happened again with the Brics summit is incredible.

Xi Jinping - who is also the chair of the Central Military Commission in China - cannot be happy with this emerging pattern.

Image copyright Reuters Image caption People look across to North Korea from Tumen

The North Koreans, in turn, would be furious with the behaviour of their old Cold War allies. China has not only backed sanctions against them in the United Nations Security Council but, as the isolated regime's principal trading partner, it has also been the principal implementer of these sanctions, turning back coal shipments and the like.

How China could fight back

Yet most observers know that, if it really wanted to, Beijing could bring crippling economic pain to North Korea. Heading into winter, it could freeze oil and gas supplies.

Then there are the banks.

North Korea is thought to conduct an enormous amount of laundered business via Chinese financial institutions. Various front businesses have been set up to facilitate money and products to flow in and out of the country with the assistance of these bodies. The Chinese government cannot be unaware of this and they could pull the plug on it tomorrow if they wanted to.

But they don't for one reason.

The Chinese government does not like the regional instability that their neighbour's nuclear weapons testing programme brings, but Beijing fears something even more.

Media playback is unsupported on your device Media caption North Korean state media announces "hydrogen bomb" test

They worry that total regime collapse in Pyongyang, leading to a unified Korean Peninsula dominated by the South, could lead to US troops on the border within marching distance of Yanji and they will put up with an awful lot from the Democratic People's Republic of Korea as long as this does not happen.

The Environment Ministry here has announced that it has now started "emergency radiation testing" along the frontier. The government's displeasure would be significant if Chinese territory has been contaminated.

The Chinese Foreign Ministry's official response to this latest North Korean nuclear weapons test condemned it strongly but, with increasingly loud calls coming for this country to do more to pressure Kim Jong-un to give up intercontinental ballistic missile ambitions, there would be serious frustration within the upper echelons of the Chinese Communist Party as to what they can realistically do next.

The North Korean leader has made his nuclear ambitions a hallmark of his administration to the extent that it is hard to see what type of offering or threat could alter this situation.

That is, unless the US and China have come up with a secret agreement which would see American troops leave Korea in the event of unification… if that was in place it could change everything.