At an election night watch party four years ago at the residence of the U.S. ambassador to Belgium, festive European diplomats were stunned into wine-soaked silence as Donald Trump captured Florida around 4 a.m. Brussels time.

This time, they are determined not to be shocked by the U.S. results. No matter who occupies the White House in January, Europe is preparing a more independent course.

Many here would prefer a victory by former vice president Joe Biden. While Trump has his fans among Central Europe’s populists, his approval in Western Europe has remained low throughout his term — fewer than 1 in 5 people surveyed by Pew Research Center trust him to do the right thing. His handling of the pandemic has only hardened European views.

Even if Trump loses, though, few policymakers in Europe expect the world to revert to the way it was before he launched Oval Office screeds against NATO and the European Union. Europeans do not believe they can depend on the United States as they did before. They want to be ready to act, with or without Washington.

“Trump symbolizes that there is a United States upon which we cannot rely,” said Nathalie Tocci, an adviser to E.U. foreign policy chief Josep Borrell.

And so, European nations plan to bolster their militaries. They are talking about taking more responsibility for security in northern Africa and the Middle East, regions far closer to them than to the United States and where they retain post-colonial ties. Backers of the 2015 Iran nuclear deal want to keep it alive. Some policymakers say they want to promote Europe as a third global power, along with the United States and China, fully aligned with neither.

“In an increasingly brutal world,” French Foreign Minister Jean-Yves Le Drian told French ambassadors to European countries recently, “Europe must finally fully emerge from its time of innocence and naivete to forge its own destiny. Otherwise, others will decide its fate.”

Elements of the get-fit-quick strategy would be a victory for Trump, who has added pressure to calls from 2014 by then-President Barack Obama for Europeans to increase their defense spending. But other possible efforts, such as a conciliatory China policy or a parallel, dollar-free financial system that would protect Europeans against U.S. sanctions as they pursued business with Iran, would increase tensions with Washington, even in a Biden administration.

The Europeans may fall short of their goals. Autonomy requires time and money, and the pandemic is consuming both of those resources. But if they enact even some of their plans, they would become a far different partner to the United States than they have been in recent decades.

“In one regard, Trump has had a lasting effect, and that’s the level of trust that a wide majority of Europeans are willing to invest into the transatlantic partnership,” said Reinhard Bütikofer, a German Green Party lawmaker in the European Parliament. “We have fallen to lower levels of trust than ever before at the moment, and I don’t expect this to revert very easily to what we used to know.”

Peter Beyer, the German foreign ministry’s coordinator for transatlantic cooperation, said one low point of the past four years was when Trump branded the E.U. a “foe” in trade relations.

“That is something that crossed a red line,” he said.

When Trump decided to pull 12,000 troops from Germany, Berlin learned about it through media reports.

For a week, “there was silence,” Beyer said. The German ambassador in Washington found herself stonewalled as she reached out to the administration.

“It was a dead mailbox,” he said. “That’s not the way you treat an ally.”

Biden’s tone as president would surely be friendlier with Europe. His foreign policy team is stocked with former officials who have long-standing ties with the European capitals. He wants to reverse Trump decisions on climate change, the World Health Organization and the Iran deal — all European priorities.

But some of the irritants in Trump-era transatlantic relations have bipartisan backing in Washington. Most Democrats and Republicans are increasingly hawkish on China, demanding that Europe keeps Chinese companies out of sensitive digital infrastructure. Free trade deals are passe. Even the Iran nuclear deal, a centerpiece of Obama’s foreign policy achievements, has skeptics on the Democratic side of the aisle.

Few in Europe take for granted that future U.S. presidents will speak as frequently with the German chancellor as Obama did. They understand the United States may not be as ready to take a leading role within NATO as it did after Russia annexed Ukraine’s Crimea peninsula.

“The structural change, at the end of the day, is that the U.S. is going to be more preoccupied with China; it’s going to be more preoccupied with many other domestic issues,” said Latvian Foreign Minister Edgars Rinkevics. “But, of course, appearances are going to be different between Democrats and Republicans.”

Rinkevics said that even in private, his fellow foreign ministers have given up trying to predict who will win the election.

French President Emmanuel Macron has been most vocal about the need to stand apart from the United States, barnstorming across Europe with a vision of “strategic autonomy.”

But for any true transformation in Europe, Germany must also be on board, and in the post-World War II period, it has been more attached than France to ties with the United States. It is also more dependent on the U.S. shield: Germany’s parliament keeps a tight leash on combat deployments, and its defense spending, at 1.6 percent of its annual economic output, is short of NATO commitments.

Many ordinary Germans are skeptical of taking a more activist role in global affairs, but leaders on different points of the political spectrum have begun to accept that something needs to change.

“We cannot wait until someone else is dictating us an agenda, be it the Chinese, be it a Trump two,” said Beyer, the transatlantic coordinator. “We have to find where we want to stand, where we want to go ourselves.”

Some leaders hope strengthening Europe will also strengthen relations with Washington.

Europe needs to take powerful actions itself “so that the United States can see Europe as a strong partner on equal terms, not as a damsel in distress,” Germany’s center-right Defense Minister Annegret Kramp-Karrenbauer said in a speech Monday in Berlin, echoing sentiments from an op-ed by her center-left coalition partner, Foreign Minister Heiko Maas, days earlier.

“It is in our own security interest to be able to cope with the crises on our doorstep, if necessary on our own,” Maas wrote in Germany’s Welt am Sonntag newspaper Sunday. “That applies even more after the election — no matter who wins it.”

If Trump is the victor, though, the speed of change could be far different — and Europe’s limits would be on starker display. Some here fear he would withdraw from NATO in a second term, unbound by the constraints of some of his first-term foreign policy advisers. That would be a boon for Russia and would require a radical change in European policy.

But even on less complicated issues, Europe has found acting alone difficult during the Trump years. It has pushed forward with an ambitious climate agenda, but it can do little to dent global emissions without U.S. cooperation. The Iran deal remains on life support, rather than totally dead, but Europe’s effort to build a parallel financial system to enable trade with Tehran has been largely ineffective, and if Trump is reelected, the deal will probably collapse altogether. Europe is internally divided on how to recover economically from the pandemic and even about how much to care about the rule of law and democracy.

Still, Europe has had a taste of life in a post-American world, and that may shape its future, some analysts say.

“Europeans realized what they have to lose if the U.S. really disengages,” said Daniela Schwarzer, director of the German Council on Foreign Relations, who also advises Borrell. “We are not anywhere close to European sovereignty or strategic autonomy, but the awareness of what Europe is lacking is there. That’s the new mind-set.”

Birnbaum reported from Riga, Latvia, and Morris reported from Berlin. Luisa Beck in Berlin contributed to this report.