Joe Biden has never met Boris Johnson but his initial impressions were not favourable. Mr Biden in 2019 called the British prime minister “a physical and emotional clone” of Donald Trump; he views Brexit as a strategic disaster.

Yet when Mr Biden is inaugurated as US president next Wednesday, a new phase in UK-US relations will begin, with Mr Johnson viewing the partnership as the keystone of his post-Brexit vision of “global Britain”.

Rarely has the personal relationship between British prime minister and US president been so scratchy even before the inauguration ceremony has taken place; but both sides believe it can be overcome.

Mr Johnson’s role as host of both the G7 and UN COP26 climate change summits this year give him a unique opportunity to build a partnership based on shared policy objectives. A trade deal between the UK and US is seen as one of the big potential prizes of Brexit.

Mr Johnson smarts at the comparisons with the outgoing president, who called the UK premier “Britain Trump”. One ally says: “Boris hates the comparisons with Trump. He wants to be a mainstream European leader. When he looks in the mirror, he wants to see Macron, not Trump.”

But Brexit has tarnished Mr Johnson’s reputation in Democratic circles in Washington. Mr Biden was vice-president to Barack Obama, who made it clear that US interests were better served by Britain remaining at the heart of the European project.

The prime minister’s threat to break international law over the Brexit settlement in Northern Ireland brought a rebuke from Mr Biden, who is proud of his Irish ancestry. Mr Johnson’s suggestion in 2016 that Mr Obama disliked Britain because he was “part-Kenyan” is still remembered in Washington.

British diplomats ponder whether there will be much chemistry when Mr Biden and Mr Johnson eventually do meet. “I’m not sure Boris’s version of public school charm and florid language will work with him,” says one. “His way of conducting conversations might irritate Biden.”

But while previous presidents have bonded on a personal level — for example Bill Clinton and Tony Blair or Ronald Reagan and Margaret Thatcher — the transatlantic relationship usually transcends the personalities of the principals.

One British official notes that the depth of commercial, military, cultural and historic ties usually combine to create a strong relationship between prime minister and president. “You can’t always tell at the outset how they will get on,” the official said. “Events forge relationships.”

Christopher Meyer, former British ambassador to Washington, said: “I think it will play out fine. On the hard issues that Joe Biden will have to address with allies, there’s a remarkable level of alignment of national interest between the US and UK.”

It is Mr Johnson’s good fortune that the completion of the Brexit process on January 1 with the conclusion of a trade deal with the EU coincided with him assuming the presidency of two major international events in 2021.

The prime minister sees “an independent” Britain as a convening power, able to operate globally and committed to the international order and upholding democratic values.

The G7 summit in June, Mr Biden’s first big international gathering, is intended to map a route out of the Covid-19 pandemic. Other democracies including South Korea, Australia and India will be invited as guests — part of an informal “D-10” group favoured by London and Washington.

“Biden will want to make a good impression,” said Kim Darroch, another former British envoy to Washington. “We should be going to them really early and asking what he wants to get out of it.”

Mr Johnson’s other piece of good fortune is that Mr Biden is committed to working with allies and to fighting climate change; in November the COP26 summit in Glasgow aims to accelerate efforts to reduce emissions.

Another area of increasing alignment between London and Washington is over China, with Mr Johnson’s government taking an increasingly hawkish stance towards Beijing, over human rights and technology issues.

While Britain, under David Cameron’s government, was accused by fellow European leaders of kowtowing to Beijing, things are changing. Mr Johnson tells colleagues: “People think I’m soft on China — that’s not true.”

Mr Johnson’s government is banning Huawei from its 5G networks — albeit under pressure from the US — and last week took action to ban Chinese imports using forced Uighur slave labour. The EU, meanwhile, signed a new investment agreement with China at the end of 2020.

Tom Tugendhat, who co-chairs the China Research Group of Tory MPs who campaign for a tougher stance on relations with Beijing, said: “The Biden team has already set out a tough agenda on China, but with much more international co-operation than the outgoing administration.”

Leslie Vinjamuri, director of the US and Americas programme at Chatham House, said: “Democracy, human rights and technology are the big umbrella areas where we should expect to see a real effort by the Johnson government and incoming Biden administration to co-ordinate policy.”

Tom Wright, an expert in US-Europe relations at the Brookings Institution, said: “I don't think Biden's going to hold grudges for previous things. If the UK is active in how to operationalise a lot of these shared interests and act on them and have some good ideas and initiatives, that's going to be more important to Biden than what has gone before.”Additional reporting by Sebastian Payne