Gavin Williamson is a loose cannon. That would not matter so much if, as was the case until a couple of years ago, he was a government whip whose views were of little account. But Theresa May’s surprise decision to make Williamson defence secretary has given him an international platform, and a degree of responsibility, to which he appears ill-suited.

Until now, his most publicised blunder concerned his schoolboy remarks following last year’s chemical weapons attack in Salisbury. Asked how he thought Vladimir Putin might respond to British sanctions, he replied: “Frankly, Russia should go away and it should shut up.” He was widely mocked.

Williamson’s reported role in the abrupt cancellation by China of a visit to Beijing this weekend by the chancellor, Philip Hammond, elevates questions about his competence to Chris Grayling’s chart-topping level. Hammond hoped to secure the lifting of bans on British poultry and cosmetics exports worth £10bn, a badly needed boost to post-Brexit trade prospects. That chance has been lost, for now at least.

Chinese anger apparently focused on Williamson’s announcement last week that Britain would send a Royal Navy aircraft carrier, HMS Queen Elizabeth, to the Pacific region in or around 2021. The expectation, not denied in Whitehall, was that the ship would enter the South China Sea on what the Americans call a “freedom-of-navigation” patrol.

Williamson’s clumsiness reflects what seems to be an established predilection on his part for hawkish remarks

China has contravened accepted international legal norms in building military bases on artificial or reclaimed islands in the South China Sea. Its attempts to prevent shipping traversing what it has unilaterally decreed to be sovereign waters is unacceptable and deserving of robust challenge. But Williamson should have known that announcing Britain’s intentions so far in advance would be viewed as an unnecessary, deliberate provocation that was certain to elicit a sharp response. It is not a new problem, after all. Last September, a British warship, HMS Albion, sailed into a similar storm when it approached the Chinese islands.

Williamson’s clumsiness reflects what seems to be an established predilection on his part for hawkish, even confrontational remarks. Maybe this is his attempt to vanquish suggestions that he is a boy in a man’s job. Or perhaps he harbours Conservative leadership pretensions and thinks this is the way to get noticed here and in Washington.

Whatever his motives, Williamson’s latest, aggressively anti-Russian comments, coupled with his ideas about maximising Britain’s “hard power”, deploying “swarm squadrons” of drones and enhancing the country’s military “lethality” and “mass”, appear unrealistic. They do not sit well with the actuality of a mid-size European power beset by a shrinking economy, vanishing allies and declining international standing.

It is no surprise to learn such dangerous daydreams are justified by claims that Brexit Britain has reached “a great moment in our history”. If Williamson means the country will be less secure, then he is right. A poorer, lonelier Britain will be more vulnerable to foreign threats, as China’s high-handed behaviour over Hammond’s trip shows.

Trading with China is a problematic proposition at the best of times. David Cameron’s government went out of its way to inaugurate a “golden era” of bilateral relations, rolling out the red carpet for Xi Jinping in London in 2015. But China’s president is a dictator in all but name whose authoritarianism is highly objectionable and whose contempt for human rights from Xinjiang to Hong Kong is wholly unacceptable.

Even so, if you believe you can somehow make Brexit a success by kowtowing to the world’s second biggest economy, then surely you do not antagonise your hosts on the eve of an important meeting. It is a measure of the incompetence of May’s ministers that they do not even toady well.