Donald Trump could be elected president of the United States next week. But what plans has the UK got in place for this eventuality and what could it mean for its place in the world?
Picture the scene. It is 20 January 2017 and a cold wind is blowing across Washington's Capitol as Donald John Trump raises his right hand and proclaims that he will faithfully execute the Office of President of the United States.
As he looks the chief justice in the eye, hundreds of millions of people around the world wonder what his four-year term will bring.
Among them are UK civil servants and politicians, pondering - with negotiations for leaving the European Union also soon to begin - what all this means for their country.
It could happen. So, how well prepared is the UK for dealing with Mr Trump, who has never previously held elected office, and how is the future looking?
Defence and security
The UK and US share a language and much cultural heritage, but, argues Tim Oliver, a fellow in European-North American relations at the London School of Economics, the truly "special" quality in their relationship is the sharing of intelligence, as well as co-operation over nuclear weapons and special forces.
Mr Oliver says there is a risk this could "sour" because of the "degree of distrust and unease" felt by the government towards Mr Trump, "an erratic president who appears willing to do anything when it comes to torture, bombing, relations with authoritarian states".
Critics accuse Mr Trump of isolationism, but he describes his foreign policy stance as one of "Americanism, not globalism". He has suggested that Nato countries which do not pay their dues into the military alliance could lose US protection in the event of an invasion by, say, Russia.
The UK would not be directly affected by that, as it has met its Nato spending target. But, as the country leaves an EU moving towards closer defence and foreign policy ties, could this cause problems?
"A stronger Nato would suit a Brexited UK better," says Kori Schake, who acted as senior policy adviser to Republican presidential candidate John McCain in 2008.
"But I also think he'll quickly discover how much the US gets from our allies and how important their contributions are to what the US tries to get done in the world. It's pretty lonely out there without Nato allies."
Before the European Union referendum, President Barack Obama warned the UK it would go to "the back of the queue" for signing trade deals with the US if it opted for Brexit. Mr Trump, however, has been far more positive.
His trade adviser, Dan DiMicco, said last month that he "absolutely" wanted to do a deal with the UK as soon as possible after Brexit, which is set to happen in early-to-mid-2019.
"I could see that happening," says Ms Schake, "especially since the EU seems unwilling to move forward with the US-EU deal.
"A bilateral agreement with Britain could be a huge opportunity for Trump to prove he's in favour of 'the right kind of deals'. But whether that would constitute a good deal for Britain is more difficult to say."
Mr Trump's website does not mention Europe or the UK in its section on trade, focusing more on relations with China and Pacific countries.
Theresa May has not offered an opinion on the candidate she would prefer as US president. But last year, after Mr Trump suggested that parts of London had become so radicalised that police did not dare enter, she called his remarks "divisive, unhelpful and wrong".
Asked about these last month, Mrs May played down the significance of her criticism, saying: "I made those comments in relation to some particular references he had made."
Foreign Secretary Boris Johnson has also made quips at Mr Trump's expense and MPs have even held a debate on barring him from the UK. So, in the early days of the Trump administration, one might anticipate some awkward moments, requiring delicate diplomacy.
"The UK government has a genius for figuring out how to get along with and be influential with new American administrations," says Ms Schake, who works as a research fellow at Stanford University's Hoover Institution.
Tony Blair managed to move from a close friendship with Bill Clinton to another with George W Bush.
More trickily, in 1992, John Major's Conservative Party helped George HW Bush's re-election campaign. Bush lost to Clinton and there was some initial awkwardness, which was overcome.
The problem is, Ms Schake argues, that "Trump seems to be exceedingly thin-skinned and grudge-holding", adding: "But it's a mighty large crowd of foreigners who've had alarming or disparaging things to say, so he won't have much choice other than to take friends where he can get them."
What do we know about unknowns?
Personal relationships are key to diplomacy and civil servants will have been gleaning as much information on Mr Trump and his potential team as they can.
"Hillary Clinton is clearly extremely well known in the UK. People will know the sort of people she's looking to use in her administration," says Jill Rutter, a former Downing Street and Treasury civil servant who works for the Institute for Government.
"Often the people in senior positions will have held more junior or middling roles in previous ones, so you can build connections.
"I would have thought that extremely difficult with Trump. You can look back at the George W Bush administration, but how many of the people who served in it would do the same for Trump?"
Many mainstream Republicans have criticised or refused to endorse Mr Trump, including both Presidents Bush and Mr McCain.
We know his running mate, Indiana Governor Mike Pence, would be vice-president. Other senior figures in his campaign include New Jersey Governor Chris Christie and former New York Mayor Rudi Giuliani.
Mr Trump is a hugely famous man, with a long career in business and a career in reality TV, but, argues Mr Oliver, he comes with many "known unknowns", particularly the identities of those who would serve in his administration.
Another complication exists. In the US, senior appointees have to be confirmed by the Senate. Even with a Republican majority, the party establishment may be less than helpful, making personnel even harder to predict.
Then, says Mr Oliver, the UK, and the rest of the world, will have to deal with "unknown unknowns, such as what Trump might say or do next".
"I don't know to what extent the British embassy in Washington has been able to get close to the Trump campaign," says Ms Rutter.
"If he gets elected, then we will have to go into the Washington version of Kremlinology, trying to work out what's really going on."