As Hillary Clinton and Donald Trump enter the final stages of their US presidential election campaigns, we look at how the world’s capitals are preparing for the result.

Mexico

With its currency under fire and its economy threatened by a Trump victory, Mexico is preparing a contingency plan in the event of the Republican triumphing on Tuesday.

Agustín Carstens, central bank chief, says a Trump win would be a “hurricane” for Mexico, which exports more than 80 per cent of its goods north of the border, and says that the government is working on an emergency Plan B.

“If the adverse situation materialises, it’s foreseeable that the Mexican authorities will respond in some way,” he said on television. “It’s a contingency plan that we’re discussing with the finance ministry. We hope we don’t have to use it.”

He did not say what the emergency plan consisted of, other than an adjustment “in our policy position, if necessary”. Though the government claims to have been working on contingency plans for months to mitigate the fallout from a Trump win, it has announced nothing concrete and has long looked like it has been caught napping.

With market volatility intense, however, it has rowed back on the prospect of intervening in currency markets at the moment.

At least one senior Mexican official has the screens on his desk tuned permanently to fivethirtyeight, the polling website, and the market value of the peso, which has taken a fresh hammering as Mr Trump has pulled level with Mrs Clinton ahead of Tuesday’s vote. The peso is widely used as an emerging markets proxy and has tended to plunge when Mr Trump’s prospects rise.

Nomura reckons the peso could fall to about 22 to the dollar if he wins, and recover to about 17.9 if Mrs Clinton pulls off a victory. The peso is trading at just over 19 to the dollar now. However, the market is pricing in a bigger fall — to some 26 — in the event of a Trump win, Nomura notes.

Mexicans have a dog in the US election fight like never before because of Mr Trump’s pledges to scrap the North American Free Trade Agreement, slap punitive tariffs on car exports, deport more than 11m undocumented migrants and build a border wall at Mexico’s expense if he is elected. As one newspaper commentator wrote: “This is our election too.”

Enrique Peña Nieto has still not recovered from an outpouring of scorn after hosting Mr Trump in the presidential palace in August — and failing to take him to task in public for policy pledges that insult Mexicans.

He has pledged to work with whoever is elected but Mexican officials’ jitters are palpable. As the storm over the Trump visit abated and Mrs Clinton recovered in the polls the senior official confessed that he was sleeping easier at night. That is probably no longer the case.

On November 17, just over a week after the election, Mexico’s central bank holds its next scheduled rate-setting meeting, with another set for December 15, the day after the US Federal Reserve meeting where a possible US rate rise has been signalled.

Hillary Clinton visits Beijing as US Secretary of State in 2012 © Reuters

China

For President Xi Jinping and China’s other Communist rulers, the US election is a choice between the devil they know and another who, in their eyes, is worryingly unpredictable.

As first lady and secretary of state, Mrs Clinton had a series of public run-ins with Beijing officials that they remember bitterly — most famously her decision to shelter a Chinese dissident in the US embassy while she was visiting the Chinese capital in 2012.

China knows that as president Mrs Clinton would be critical of Beijing’s human rights record, as she was during her first visit in the 1990s, and would challenge territorial claims in the South China Sea.

On the other hand, Mr Trump’s suggestion that he could reduce or even withdraw US forces from South Korea and Japan would be a geopolitical gift for Beijing if acted upon. But the Chinese government also worries about his threats to erect trade barriers and punish it for allegedly manipulating the value of the renminbi.

On one important issue, however, China stands to gain no matter who is elected. If Barack Obama is unable to secure passage of the Trans-Pacific Partnership, the regional trade pact that excludes China, Mrs Clinton and Mr Trump have both vowed to kill it.

Saudi Arabia

The view from Riyadh is clear: elections in Washington change the Middle East for good, and ill.

George H W Bush was a friend to the Gulf states, a stalwart defender of Kuwait against Iraqi aggression. But his son’s ousting of Saddam Hussein roused sectarian strife in Iraq, expanded Iranian influence into Baghdad, triggering a Sunni response that has mutated into radical group, Isis.

Adding to this maelstrom, the prospect of a President Trump is viewed with alarm. His proposal to ban Muslims from the US was accompanied by calls for Riyadh to pay for US military protection. These pronouncements come amid the new threat from US legislation allowing 9/11 victims to sue Saudi Arabia.

For Saudis, the bombast of Mr Trump would only add to the pyrotechnics.

A second Clinton presidency would sit more easily with the dynastic Gulf monarchies, who have donated millions of dollars to the Clinton foundation.

Mrs Clinton knows the region’s political actors, their fears and ambitions.

In contrast to Barack Obama, she was naturally more cautious about jeopardising historic American ties with dictators during the Arab spring uprisings.

Saudi leaders hope that she might adopt a more muscular approach than Mr Obama, who has disappointed Riyadh over inaction on Syria and opening up to arch-rival Iran.

A Trump presidency would present a fundamental challenge to the EU © AFP

EU and Nato

The international institutions of Brussels are dreading the implications of a Trump presidency.

For Nato in particular, Mr Trump’s campaign promises would overturn fundamental elements of postwar US foreign policy that are the bedrock of the alliance.

An organisation that has for decades leaned on Washington’s political commitment, military clout and deep pockets would be thrown into a potentially divisive and defining debate over how to sustain the west’s collective defences.

For the EU, it would also present a profound challenge to two important elements of the bloc’s external policy: trade liberalisation and sanctions against Russia. Any thaw in US-Russia relations could upend the political consensus that has underpinned the EU’s Ukraine-related sanctions regime, and potentially cause a damaging rift between EU hawks and doves.

If Mr Trump’s antitrade rhetoric translates into protectionist actions in office, rolling back years of liberalisation in world trade, Europe’s already embattled trade policy would be dealt a heavy blow. At a minimum, a Trump presidency would probably drive the final nail in the coffin of a proposed US-EU trade deal.

The trio of Baltic states look to a Trump victory with particular dread after the Republican nominee refused to guarantee that he would come to the defence of Estonia, Latvia or Lithuania in the event of a Russian invasion — throwing into doubt a longstanding US commitment.

A Trump victory would be a conundrum for the UK, particularly for MPs who once debated banning him from entering the country © AFP

UK

As the race narrows, the UK government has stepped back from its criticism of Mr Trump. In July, Theresa May, prime minister, said that the Republican candidate was “plain wrong” over his allegations about the UK’s Muslim population. Now the Trump campaign claims to be having “very productive talks with representatives of the Foreign Office”.

A Trump victory would be a conundrum for the UK, particularly for MPs who once debated banning him from entering the country.

Mrs May has pushed the Obama administration (and the EU) to take a tougher line on Russia. With Mr Trump, “the US-Russia relationship would be smoother — at the expense of UK and European interests in Syria”, said Xenia Wickett, head of the US programme at the Chatham House think-tank.

A Clinton administration would be more of a known quantity, with senior diplomats already familiar with UK officials. Before becoming foreign secretary, Boris Johnson endorsed Mrs Clinton, albeit in an article that likened her to a “sadistic nurse in a mental hospital”.

As is usual, Kim Darroch, the UK’s ambassador in Washington since January, is meeting both campaigns. The UK is unlikely to have a wishlist of priorities for the new administration, said Ms Wickett.

Instead, given the closeness of the bilateral relationship, the challenge is how to reframe discussions about Russia, the Middle East, and post-Brexit trade to suit the new White House.

Iran

Iranian politicians and the country’s business community are keeping a watchful eye on the US election, as the result could either help speed up implementation of the landmark nuclear agreement or trigger a new round of uncertainty.

Moderate forces close to Hassan Rouhani, the centrist president of Iran who seeks re-election next May, want Mrs Clinton to win in the hope that she would remain committed to the deal, even if she could adopt tougher policies in the Middle East against Iran’s interests.

But a victory for Mr Trump, who has questioned the agreement, is expected to help Iran’s hardliners argue that they are the ones who can stand up to what they believe would be his anti-Iran policies, and further undermine the nuclear accord, the moderate’s biggest achievement.

Ayatollah Ali Khamenei, Iran’s supreme leader and ultimate decision maker, who sees the US as the arch-enemy, said on Wednesday: “Those who think if we make compromise with the US, our problems will be resolved are wrong.”

© Bloomberg

Germany

Chancellor Angela Merkel has declined to comment publicly on the two contenders, but there is little doubt that she shares the views of many mainstream German politicians who would hate to see Mr Trump in the White House.

Norbert Röttgen, head of the Bundestag foreign affairs committee, said a Trump win “would lead to the deepest alienation between Germany, and perhaps Europe, on the one hand, and the US on the other, at least since the Vietnam war”.

Even after the latest twist in the emails saga, Germans back Mrs Clinton strongly, with 73 per cent of them supporting her in the latest opinion poll by the Forsa research institute. Just 5 per cent would vote for Mr Trump. Only among supporters of the rightwing Alternative for Germany did Mr Trump score respectably — 22 per cent.

Many Germans struggle to understand Mr Trump’s position on Germany. The Republican candidate has condemned Ms Merkel’s refugees-welcome policy as a “disaster” and praised the chancellor as a “really great world leader”.

Nevertheless, about 80 per cent of Germans believe Mr Trump’s election would be bad for relations, according to a ZDF television poll.

Japan

Officials in Japan are hanging on every US poll but most expect a victory for Mrs Clinton. Tokyo regards her as a known quantity even if there was little warmth in US-Japan relations when she was secretary of state, and has tried to cultivate her advisers.

One visible preparation for a President Clinton is a rush to get the Trans-Pacific Partnership trade deal through parliament, with a lower house vote as early as Monday.

According to one senior diplomat, officials fear a victorious Mrs Clinton may seek concessions to make TPP more palatable to her voters. Tokyo will be better placed to resist if it has already ratified the deal.

Given Mr Trump’s assertions that Tokyo free-rides on defence and engages in unfair trade practices, Japan regards the prospect of his victory with some horror. If he is elected, Japan is likely to engage cautiously as it tries to figure out how much of his campaign rhetoric was for real.

Reporting by Jude Webber, Tom Mitchell, Simeon Kerr, Alex Barker, Henry Mance, Najmeh Bozorgmehr, Stefan Wagstyl and Robin Harding