The sixth and latest nuclear test by North Korea on September 3 has once again put the spotlight on China. US President Donald Trump has repeatedly asked China to do more to rein in the nuclear weapons and missile development by its neighbour and treaty ally, but to no avail.

In fact, China may have already lost most of its direct influence on North Korea through past unsuccessful attempts to control the rogue state’s behaviour. It does still have more leverage on its neighbour than any other country because it supplies most of the oil to North Korea, which in turn fuels Kim Jong-un’s military and industrial machinery.

But China is unlikely to completely cut off crude and refined oil supplies to its troublesome ally. This is because it believes it is unlikely that North Korea would give up its nuclear weapons and delivery systems any time soon.

Russian President Vladimir Putin told the BRICS (Brazil, Russia, India, China and South Africa) leaders in China this week that the North Koreans would “rather eat grass than give up their nuclear program”. This echoes former Pakistani leader Zulfikar Ali Bhutto, whose country defied international sanctions to develop its own nuclear weapons.

The Chinese and Russians now believe it would be almost impossible to disarm North Korea of its nuclear weapons without a comprehensive settlement with the US.

There was a time when China did enjoy considerable influence over North Korea. Special trains bearing the country’s leader frequently chugged into Beijing to a warm welcome from Chinese leaders.

Kim Jong-un’s father, Kim Jong-il, was taken to China’s capitalist enclave of Shenzhen and its other bustling cities, such as Shanghai, on his seven visits to China as leader. These were intended to inspire him to take a leaf out of China’s book and launch his own market-friendly economic reforms. But he politely refused to toe the line while still accepting China’s economic and diplomatic support.

Kim Jong-un has gone a step further in rebuffing the Chinese leadership. Since becoming North Korea’s leader in 2011 he has never visited China, not even when it celebrated the 70th anniversary of the end of the second world war by hosting a grand military parade in Beijing in 2015. Not surprisingly, Chinese President Xi Jinping has also not visited Pyongyang.

Some Chinese scholars privately blame their own government for North Korea’s rapidly developing nuclear weapons program.

It is believed that, in an effort to persuade its estranged ally to desist from developing nuclear weapons, Xi had sent a senior envoy to Pyongyang with a message that China would no longer abide by the security provisions of its 1961 Treaty of Friendship, Co-operation and Mutual Assistance with North Korea. Instead of buckling under pressure, Kim Jong-un decided to accelerate his nuclear weapons program because he could no longer rely on China’s support.

Whether or not China is indirectly responsible for Pyongyang’s repeated nuclear tests in violation of UN Security Council resolutions, it is still the only permanent council member to have the ability to make life really difficult for the Kim regime. China could do so by fully enforcing UN sanctions and cutting off oil supplies.

Nevertheless, the most we can expect from China, in addition to the measures it has already taken – for example, stopping coal imports – is a reduction in oil supplies. The Chinese leadership does not want to do anything that could bring about the collapse of the North Korean regime and, in the process, provoke its leader to lash out at China.

In any case, a partial reduction in oil supplies is unlikely to have a significant impact on North Korea’s behaviour. It would probably make up the shortfall by smuggling in oil on the high seas.

No doubt China’s relations with Pyongyang have deteriorated to such an extent that China finds its behaviour unacceptable and insulting. Chinese people are also tiring of the shenanigans of Kim and his cronies. This is evident in commentary on Chinese social media, which the Chinese government is trying to suppress lest it projects its leaders as ineffective.

China has always been loath to adopt or support measures that could trigger a collapse of the North Korean regime and send millions of impoverished Koreans flooding into China’s northeast.

China also does not want to see an end to North Korea’s status as the buffer between China and the American presence in the southern Korean peninsula. It fears a premature reunification of the two Koreas under US influence. A unified Korea could bring American troops to China’s doorstep.

So, while China’s leaders probably dislike Kim Jong-un as much as the Americans do and want an end to his reckless behaviour, they are unlikely to heed Trump’s calls to help him bring the tyrant to his knees, even if they could.

China is happy to make Trump squirm and appear to his own people and the world as feckless. But it will be watching the American moves very carefully and do anything to avoid war on the Korean peninsula. That could have serious ramifications for the region and the world, and impede China’s own seemingly inexorable rise as a great power.