SAUDI ARABIA HAS taken to bemoaning the Obama administration’s plans for the Middle East. Europeans are up in arms about spying. China is sneering at the dysfunction in Washington. Latin America feels alternately ignored and intruded upon. These are not easy times for American diplomats. Their country is smarting from the anxiety of decline, and each new controversy seems to plunge the barb a little deeper.

After five years immersed in a world-class financial crisis on top of a dozen more in unhappy wars, the mood in America was bound to be dark. And yet the great engines of American power are turning. The armed forces are peerless and will remain so, even when they are financed less lavishly. The economy is clawing its way back to health. Despite Iraq, the ideals of liberal democracy and open markets are potent still.

In geopolitics America has no direct challenger, but without maintenance primacy frays. One threat is Washington politics, eroding American authority in the world. The other is the shifting international system—which no longer needs America as a guard against Soviet aggression and must find a way to reflect the aspirations of emerging powers, chiefly China.

Only a country that had glimpsed supremacy would count those two threats as decline. Predictably, the unipolar moment after the Soviet collapse was transient—if only because it tempted America into relying too much on force. The return to the frustrations and reverses of everyday diplomacy is uncomfortable, no doubt; and if America withdraws or lapses into peevishness, dangerous as well. Yet the country has one tremendous advantage. What will most determine its destiny is none other than America itself. Here are some of the things it should do.

Start with a strategy

First, the Obama administration needs to define its aims. Fred Hof, a former official now with the Rafik Hariri Centre of the Atlantic Council, speaks of a “consistent absence” of objectives that lead to a strategy. The idea that Mr Obama is occupied by clearing up after Mr Bush no longer holds water. Wherever America seems absent or timid, it creates an unwelcome vacuum. When it acts, things happen.

Second, the president must ensure that strong rhetoric is not left to stand on its own, without a strategy to translate words into action. Policy in Syria went wrong because the president repeatedly seemed to want one thing and do another. He called for the ousting of Bashar Assad but stood back while Syria’s president continued to slaughter his own people. He said he would not tolerate the use of chemical weapons but then he did. After a particularly murderous chemical strike, Mr Obama looked as if he would attack Syria, but sought approval from Congress in a vote that he stood to lose. “He is a cerebral guy and may have a strategic vision for the US,” says Carla Robbins, a journalist who is a fellow at the Council on Foreign Relations. “But he hasn’t articulated it publicly and you have to wonder, especially after Syria, whether he has articulated it inside the White House.”

Third, America must go to war less often and more wisely. Instead, it should make better use of diplomacy. Robert Gates, a former defence secretary, points out that the United States has fewer diplomats than it does players in its military bands. The White House, in keeping with Richard Nixon’s tradition, treats the State Department as if it had nothing useful to offer. As a result, the main policymakers and advisers are stretched too thin. At the same time, diplomats claim, Barack Obama does not cultivate other world leaders enough.

Cultivating your friends

America should use the extra diplomatic capacity it will gain from not fighting wars to run several foreign policies at once. That is because each region requires its own style of diplomacy. The United States needs not only to walk and chew gum at the same time, it must also be able to tweet and phone friends.

Europe has sometimes seemed a low priority for America, yet the old world is a useful amplifier of American power. It is rich and armed. It can help deal with Russia and the Middle East. It is a natural ally for the increasingly vital cross-border agenda of crime, disease and climate change. Instead of treating European leaders with disdain, America should take trouble over them and think of Europe’s recovery as a strategic aim for itself, too.

Latin America is an opportunity wasted. The United States often sees its southern neighbours as a source of immigrants and cocaine, not foreign policy, but it should be trying harder with them, too. Most important is Brazil, potentially an invaluable ally; but it will not fall into Mr Obama’s lap. First he must overcome historical suspicions, aggravated recently by allegations of spying, and the inclinations of the governing Workers’ Party.

In the Middle East the Arab awakening has presented Mr Obama with one headache after another. The old autocratic order is bankrupt but nothing has taken its place. Many years could elapse before an Arab system of democratic government emerges, if indeed it does. Mr Obama clearly wishes that he could be rid of the entire mess, but oil, Israel, Islamic terrorism and Iran are core interests for the United States. “We can’t leave, and we can’t fix it,” concludes Aaron David Miller of the Wilson Centre in Washington. The Middle East has been a graveyard of good intentions. Enough of that, says Mr Miller. America should aim to be transactional there, not transformational.

One focus will be talks on Iran’s nuclear programme, which Iran insists is peaceful and most others think is designed to procure a weapon. America needs to be satisfied that this goal is put beyond Iran’s reach. In exchange, Iran wants sanctions to be lifted. It is a perilous exercise. Mr Obama has said that he is not prepared to accept a nuclear-armed Iran. Yet an American military strike against Iran’s nuclear facility would probably be only a temporary fix—and dearly bought.

America needs to use its “pivot” towards Asia to enhance its role as a balancer and conciliator. Rivalries between China and Japan, for example, or between India and China, could be highly destabilising. If any such conflicts got going in earnest the entire region might start arming itself. Mr Brzezinski recommends that America help keep the peace by acting as the region’s honest broker.

Dealing with China will require great skill. The danger is that the pivot makes China feel threatened without reassuring the region. The world’s two greatest powers could end up as hostile competitors on a path towards confrontation. To avoid such a catastrophe, Mr Obama needs to acknowledge China’s growing ambitions without sacrificing America’s fundamental interests. That is not easy when his critics will try to depict him as weak. Meanwhile Taiwan and the Korean peninsula sit like unexploded bombs. China and America need to talk often and frankly about defusing them.

The United States needs to rediscover the foreign-policy traditions that served it so well in earlier times

The cold war was an anxious time. Annihilation was never far off. But it invigorated foreign policy: the stakes could not have been higher, and the diplomatic framework was clearer than it is today. Once the Soviet Union had collapsed, though, the stakes seemed diminished and the framework redundant. America led the world, but its leaders did not seem up to the task.

For America’s own sake—and for the sake of global peace—the United States needs to rediscover the foreign-policy traditions that served it so well in earlier times. These were a glorious hotch-potch of contradictions: idealism bounded by pragmatism; generosity spiked with shrewd self-interest; internationalism conditioned by fierce national pride.

Politicians in Washington should find the day-to-day chores of world leadership entirely palatable. The spadework of much foreign policy need not deepen the partisan divide. Compared with war, diplomacy is relatively cheap. But high policy—on Iran or China, say—will depend on Congress and the White House just occasionally making common cause at the water’s edge.