The election of Donald Trump in 2016 caused great concern for China hawks. Here was a man who, as the Washington Post put it when comparing the candidates, was “bigoted, ignorant, deceitful, narcissistic, vengeful, petty, misogynistic, fiscally reckless, intellectually lazy, contemptuous of democracy and enamored of America’s enemies”. He was plainly unprepared for the presidency and it was obvious that American interests would be harmed. It was feared that he would give succour to China, which was plainly in a Great Game competition with the US, despite its denials, and it was seeking to dislodge American influence where it could, from the South China Sea to Africa and Eastern Europe.

Besides that, Trump was deeply unpopular throughout the world – his election brought a nosedive in international views on the US. Pew Research found the percentage of people expressing favourable views of the US slumping from 64% in 2016 to 49% in 2017, while the shift in confidence in President Obama to President Trump in the same period went from 74% to 23%. The soft power that makes the US the global hegemonic state, without even being seen to try, is an enormous political asset – but under Trump it is well and truly burning.

Here, then, was a huge opportunity for Xi Jinping, an open goal of once-in-a-century magnitude. But diplomacy does not exist in a vacuum, and while US decline might be precipitous, the Chinese government still had to make its case. Allegiances have to developed, on the understanding that they will be better off for that nation being elevated.

This sort of diplomatic coup can be achieved through using sticks or carrots, or a judicious mixture of the two. And here China’s efforts have been frankly deplorable. Xi Jinping has squandered China’s greatest diplomatic opportunity China has had since, perhaps Nixon’s visit in 1973, and he well and truly blown it.

If we omit the coronavirus catastrophe as a once in a lifetime pandemic, and look at the Chinese government’s dealings beyond that, a pattern of bullying, blustering and bad faith is all too evident. Take the issue of Huawei’s bid to build the UK’s 5G digital network. This ought to have been straightforward – the UK clearly wanted to go with the cheapest offer.

Yet Chinese government instead decided to strong-arm the British government, suspending a tie-up between the Shanghai and London stock exchanges in January in a transparent shot across the bows. The claim by Huawei executives that they would refuse Chinese government requests for intelligence, meanwhile,  insulted everyone’s intelligence.

Chinese diplomats have shown little respect for the UK for some time, even supporting a Chinese journalist who slapped a Conservative activist during a fringe event at the Tory party conference in Birmingham. They show little respect for the British rule of law, while blocking UK politicians from even visiting Hong Kong in a move which represents both a diplomatic insult and evidence that treaties with China mean nothing.

China’s neighbours, meanwhile, are greatly agitated by China’s claim to the entirety of the South China Sea, its decision to ignore a United Nations ruling on the demarcations of international waters (brought forward by the Philippines), and Beijing’s development of air defence identification zones on the shoals and artificial islands it has developed.

To give a sense of the extent of its claims, the “nine-dash line” – which demarcates the area in the South China Sea declared to be under the control of the Chinese state – passes by some 24 nautical miles from Malaysia – around 1800km away from the island of Hainan, the nearest genuine Chinese territory.

Meanwhile, in Africa, China’s reputation is frequently sullied by reprehensible behaviour. From 2005 to 2018, Chinese investments and contracts in sub-Saharan Africa were worth around $299 billion. The country is now a main player on the continent. Yet all of its efforts are undone by examples like a Chinese hotel manager thrashing a local waiter in Kenya for poor timekeeping in February this year, or a Chinese boss referring to African staff as monkeys, or children being taught to sing “I’m a black monster. I have a very low IQ!” in MandarinA performer in blackface wearing a monkey suit on China’s New Year TV show in 2018 suggests deep-seated racist attitudes. But, as China still fails to accept it has a problem, amelioration may be a long time coming.

China’s internal politics have also been a significant factor in causing countries to turn away. The forced labour camps and ethnic cleansing in Xinjiang, and the barbaric policing of protests in Hong Kong, show a leadership that plainly detests pluralism, and refuses to recognise any other legitimate internal voices. While China was able to drum up a letter from 37 countries supporting its policies in Xinjiang, the list of signatories (including Angola, Cuba, Myanmar, North Korea, Pakistan, Qatar, Russia, Saudi Arabia, Somalia, Syria, Venezuela, and Zimbabwe) did not suggest the right trajectory for Chinese diplomacy. But it did the job.

Finally, the turn by Chinese diplomats on social media towards a more aggressive stance – even to the point of peddling absurd conspiracy theories on the coronavirus – demonstrates a country less inclined to respect other nations than since the time of Mao. This “Wolf Diplomacy” seems largely manufactured for domestic consumption, but its turning away from respectful engagement is another sign of foreign policy failure. No sensible government would employ someone like Zhao Lijian as their deputy director of foreign affairs information department.

The question then is: why is Chinese diplomacy so dreadful? How has its government squandered such a rare and valuable opportunity? When Xi Jinping ascended to the Chinese leadership in 2012, one of his first speeches expressed a desire for China to tell its story better. This is a laudable aim, but to tell a story, as any teacher will tell you, requires an appreciation of your audience. Chinese diplomats work within a system that is internally facing and top-down in execution. What matters to people like Zhao Lijian is impressing his political masters, rather than the feelings and opinions of his foreign counterparts. What does come out is shrill, self-aggrandising, peremptory and brittle, if not simply ridiculous, as in the rap song praising the political meetings known as the “Two Sessions”.

Perhaps a country encompassing one seventh of humanity has a hard time believing that other nations are due equal recognition. So in 2010, Foreign Minister Yang Jiechi told ASEAN representatives that “China is a big country and other countries are small countries, and that’s just a fact.” It may be that the Middle Kingdom seeks to return not only to regional hegemony, but to the state before it was decentred from global primacy, with all other nations mere satellites around its own magnificence.

Yet the rules-based international order insists that nation-states are democratic equals, if not in any other way. But until China recognises that other countries have their own aspirations and legitimate goals, its diplomacy will remain a constant impediment on its own ambitions.