Washington has no cannier lobbying firm than the Pentagon. As such, the war games that predict a US rout by China should be taken with more salt than currently exists in all the world’s mines. Each lurid simulation of defeat is a tacit argument for more funding.

That caveat applied, even a successful Pacific war could cost more US lives than the 2,352 lost over two decades in Afghanistan. Raw scale is not the only sense in which China is a more daunting test than the forever wars. Neither al-Qaeda nor the Taliban challenged the US as a world power. Their mode of government never seduced third countries as a formula for growth and order. In turning from the “greater Middle East” to China, the US turns from a vicious but containable adversary to a historically awesome one.

It is right, all the same, to relish the change. There is something pro forma about Republican attacks on President Joe Biden over his exit from Afghanistan. As both parties know, the US is entering an era that plays far more to its technical strengths and psychic needs than the one it is sheepishly winding down.

America’s knack for great-power politics is as consistent as its fumbles against insurgencies. The fledging republic saw off British menaces, kept Europe out of its civil war, beat Imperial Japan and Nazi Germany before nursing both to pacifist democracy and waged a cold war of immense craft and patience against the Soviet Union. US failures, whether in south-east Asia, the Middle East or the Horn of Africa, have come mostly against non-sovereign enemies in irregular conflicts.

Some of this is the innate difficulty of counter-insurgency. The rest is America’s weird history as a superpower. Having had few colonies in the formal sense — Cuba and the Philippines are among the exceptions — the nation’s political, military and even journalistic elites tend to view conflict as that which takes place between states. (Blaming the fiasco of the Iraq occupation on Iran’s meddling stems from this cast of mind.)

And so an era of non-state enemies was always going to be awkward for the US. A superpower tussle is a beguiling return to the familiar. Washington’s enthusiasm for the China contest is not just a clear-eyed recognition of a real opponent. It is the relief of a governing class finding its métier again.

The change goes beyond the conceptual to the guts and grease of US power. For a generation, the Pentagon has planned for two regional (that is, Afghan-sized) wars at the same time. In 2018, its doctrine changed to fight one war for the very highest stakes.

The new posture should go better, which is to say it cannot go worse. Heroic financial and intellectual resources went into refitting history’s mightiest armed forces for the nimbler work of the terror age. To deride it all is frivolous: we cannot know how much worse the Afghan war might have been without the reforms. Still, after a generation in that country, the reality is an ascendant Taliban. Biden himself despaired of the war as far back as 2009, when he opposed Barack Obama’s troop surge.

Occupation has forced the US to live in a half-world of ambiguous goals and shifting enemies, some of whom are easier to co-opt than explicitly defeat. Great-power strategy will be a kind of liberation.

If it were just the technical challenge of China that the US will prefer, this would only be cheer for admirals and generals. What really sets the new era over the old one is its potential for some semblance of domestic unity.

Entry into the second world war helped to bind the fractious America of the interwar years. Soviet Russia did the same: when it fell, so did what bipartisanship there was in Washington. (The last unanimous confirmation of a Supreme Court justice was in 1988.) The age of terror came nowhere close as a national adhesive.

What stands out about the US ordeal in Afghanistan is not the death toll, which roughly equals the attack on Pearl Harbor. It is not even the duration. The Korean war never legally ended, remember, and the US still garrisons that peninsula by the tens of thousands.

No, the grim distinction of the past 20 years is the collapse of the national cohesion after 9/11. For all its heinous violence, terrorism was too diffuse a threat to give Americans that sense of besieged togetherness that past eras conferred. A conventional superpower, with four times their population, just might. A nation that has often defined its identity against an Other was never going to find it in Afghanistan.