Sharks are circling as the US prepares to vote, on the lookout for signs of American weakness and indecision around the world during the months-long transition period until the next president is firmly established in the White House. Call it a window of vulnerability.

No matter whether Hillary Clinton or Donald Trump wins on Tuesday, Barack Obama bequeaths a world fraught with danger. From Asia to the Middle East and eastern Europe, governments and forces hostile to US and the west may try to exploit America’s power vacuum.

The problem is not new. Unlike in Britain, the US constitution does not allow a quick handover. Clinton or Trump will be sworn in at noon on 20 January 2017. Until then Obama remains in office, but as a “lame duck” president his wishes are increasingly irrelevant.

Once installed, it can still take months for the new incumbent to establish his or her authority and complete thousands of appointments. The most important, such as national security adviser and the secretaries of defence and state, must be confirmed by Congress. This can be a contentious, lengthy process.

The most disastrous transition was probably in 1860-61 between James Buchanan and his successor, Abraham Lincoln. During the interregnum, seven states seceded from the Union. When Lincoln came to office, he found the civil war already under way.

Modern-day threats are mostly external (although some Trump supporters warn of domestic insurrection if he loses). North Korea is one of the most pressing. The dictatorship in Pyongyang has recklessly escalated its nuclear weapons programme in recent months.

North Korea’s latest provocations include the testing of a submarine-launched ballistic missile capable, in theory, of attacking the western US. The isolated regime has ignored stepped-up UN sanctions and is hardening its stance, determined to prove it is a force to be reckoned with.

Political upheavals in South Korea, where the president faces pressure to resign, a tougher military posture adopted by Shinzo Abe’s rightwing government in Japan, and the reluctance of China to crack down on its renegade ally add to a sense of growing instability.

If Kim Jong-un, North Korea’s unpredictable leader, senses uncertainty in Washington, he may be tempted to fire a shot, literally or metaphorically, across the greenhorn president’s bows – with incalculable consequences.

China faces similar temptations. It has been sparring with the US navy in the South China Sea, where its expansionist maritime claims and island-building have been ruled illegal by a UN court. Beijing is also squeezing Taiwan, whose new government its dislikes and whose de facto independence is underwritten by the US.

Does Xi Jinping, China’s all-powerful president, calculate he can use American distraction to his advantage? Some analysts suggest Xi would welcome a Trump presidency, because he and Trump think alike about national interest. Or maybe, scarily, he takes Trump for a fool he can bamboozle.

Such considerations also loom large in the Middle East, where Russia seems intent on helping the Syrian regime of Bashar al-Assad win the civil war before the next American president has a chance to change Obama’s hands-off policy or impose peace terms.

In lawless Libya, where UN efforts to foster a unity government are failing, more nasty surprises may be in store. If Islamic State is evicted from Raqqah and Mosul, Libya may become its new centre of operations. The Yemen conflict, involving Iran and Saudi Arabia, is another powder keg.

Vladimir Putin, Russia’s leader, could also use the US power vacuum to consolidate or advance Moscow’s interests, as defined by the Kremlin, in Ukraine and the Baltic region, where tensions are already high.

How would Nato respond, for example, to increased Russian military activity and cyber warfare along the border with Estonia or Latvia? The alliance would, as usual, look to Washington for a lead. But one might not be forthcoming.

Trump regularly disparages Nato, suggesting he may cut US support, and like other macho men such as actor Steven Seagal, appears to admire Putin. For her part, Clinton would be loth to begin her new presidency with an old-style superpower confrontation.

On top of all that, as the US transition looms, there are, as Donald Rumsfeld said, the “unknown unknowns”. If an unexpected, unforeseen international crisis suddenly arises, the American security safety net will be more full of holes than usual.