UK leader Keir Starmer has said that US Vice President Kamala Harris replacing President Joe Biden as the Democratic Party's presidential nominee has shaken up the White House race.

Since Biden, 81, dropped out five weeks ago due to concerns about his age, 59-year-old Harris has reinvigorated her party, edging ahead of Republican candidate Donald Trump in opinion polls.

Delegates rode a wave of optimism as she was officially crowned last week at the Democratic National Convention in Chicago, a gathering attended by senior figures from Starmer's Labour Party.

The British Prime Minister touched on the US election during a huddle with UK political reporters Wednesday during a trip to Berlin, where Starmer met German Chancellor Olaf Scholz.

"There's obviously been a profound change in the last few weeks," said Starmer, when asked by AFP if he had been impressed by the energy that Harris has injected into the campaign.

"I think everyone can see that. You saw the convention just in recent days," he added.

Centre-left Labour, back in power in Britain after 14 years in opposition, has long had close links with the Democratic Party, seeing it as a sort of unofficial sister party.

In an interview with the New Statesman magazine published earlier this month, London's Labour mayor Sadiq Khan said it was "obvious" his support lay with the Democrats.

"I'm a member of the Labour Party -- we're a social democratic party. I want the Democrats to win," said Khan, who has had a long-running feud with Trump.

"It's no secret many Labour Party members go and volunteer for the Democrats during presidential elections.

"We shouldn't pretend otherwise. Many of my staffers helped all three: (Barack) Obama, (Hillary) Clinton and Biden," Khan added.

Starmer is taking a neutral stance on the election, although experts say a Trump presidency could pose difficulties, particularly with doubts over the Republican's support for NATO and Ukraine.

It might also be more awkward: Starmer's foreign minister David Lammy called Trump "a woman-hating, neo-Nazi-sympathising sociopath" in 2018.

However, Lammy was more diplomatic earlier this year, saying in a speech that Trump's "attitude to European security is often misunderstood".

In his comments in the German capital, Starmer said "ultimately, of course, it is going to be a matter for the American people to determine, and we will work with whoever they elect into office".

"The special relationship we have between our two countries has been there for a very long time, for a very good reason."