Sometimes it seems that the politics of America and Britain are very similar. But this year it was not so.

The Conservative British prime minister sets a date for the long-awaited vote in early summer, and a few months later there is a crucial presidential election in the United States. It happened in 2016, when Britons voted for Brexit and Americans elected Donald J. Trump, and now it is happening again.

Political forecasters might be tempted to study the results of Britain’s July 4 general election for clues about the vote in the United States on November 5. After all, in 2016, the country’s shock vote to leave the European Union was seen as the canary in the coal mine for Mr. Trump’s surprise victory later that year.

Yet this time, past may not be prologue. British voters appear poised to choose the opposition Labour Party, possibly by a landslide, over the beleaguered Conservative Party, while in the United States, Democratic President Joseph R. Biden Jr. is locked in a tight race with Mr. Trump and his Republican Party.

“We’re in a very different position politically right now than the U.S.,” said Robert Ford, a professor of political science at the University of Manchester. The Conservatives have been in power for 14 years, Brexit has faded as a political issue, and there is no British figure equivalent to Mr. Trump.

Ben Ansell, a professor of comparative democratic institutions at the University of Oxford, said that while there is a common theme on both sides of the Atlantic, “it’s really bad to stay in the current position.”

By all accounts, Mr Sunak decided to call an election a few months early because he does not think Britain’s economic situation will improve between now and the autumn. Analysts say that, trailing Labour by more than 20 percentage points in the polls, Mr Sunak thinks the Tories can minimise their losses by facing voters now.

While there is little evidence that the US political calendar played a role in Mr Sunak’s decision, holding the election on 4 July has the ancillary benefit of avoiding any overlap. Had he waited until mid-November, as political oddsmakers predicted, he would have risked being swept away after the US results.

Political analysts were already debating whether Mr Trump’s victory would benefit the Conservatives or Labour. Some believed Mr Sunak might capitalise on the disruption of another Trump presidency as a reason to stick with the Tories, as he might get along better with Mr Trump than Labour’s leader Keir Starmer.

That is irrelevant now: Britain will have a new Parliament, and very likely a new Prime Minister, even before the Republicans and Democrats hold their conventions.

Still, analysts say the UK election results could hold lessons for the United States. The two countries are politically aligned on many issues, whether it’s concerns about immigration, anger over inflation or clashes over social and cultural issues.

“Imagine if the Conservative Party collapsed like in Canada in 1993,” Professor Ansell said, citing the federal election in which the Liberal Party almost completely routed the Progressive Conservative Party and even the Reform Party edged out Canada’s leading right-wing party.

Britain’s Conservatives face a milder version of this threat from Reform UK, a party co-founded by populist Nigel Farage that is running on an anti-immigration message. In the latest survey by market research firm YouGov, Reform had 14 percent support, the Conservatives 22 percent and Labour 44 percent.

Prof Ansell said the wave of reforms in Britain “could be a sign that populism is on the rise again in the UK, and it could also be an omen and a foreshadowing that the same could happen in the US in the autumn.”

In contrast, he said the big gains by Britain’s left-wing parties — Labour, as well as the Liberal Democrats and the Greens — could reassure Democrats that their better-than-expected results in the midterm and special elections were no coincidence, but part of a larger global shift.

Some right-wing critics blame the Conservative Party’s decline on the fact that it has turned away from the economic nationalism that fueled the Brexit vote and the party’s victory in 2019 under then-Prime Minister Boris Johnson. They said the Tories’ embrace of liberal free-market policies has alienated them from Mr. Trump’s MAGA stalwarts as well as right-wing movements in Italy and the Netherlands.

“Whatever you think about Trump — he’s unstable, he’s a threat to democracy — but if you look at how he’s polling, he’s doing much better than the Tories,” said Matthew Goodwin, a professor of politics at the University of Kent.

Of course, part of the difference is that Mr Trump has been out of office for nearly four years, which means that unlike the Tories, he is not being blamed for the cost-of-living crisis. Nor is he being blamed for failing to control the border, since Mr Biden is in the United States and Mr Sunak is in Britain.

In his effort to mobilise the Conservative base, Mr Sunak is striking a tone that echoes the anti-immigrant themes of Brexit campaigners in 2016. He has spent much of his prime ministership promoting a plan to send refugees on one-way flights to Rwanda. The plan is expensive, has been heavily criticised and has not been realised, but it bears little resemblance to Mr Trump’s border wall.

“This is our Trump moment,” said Kim Darroch, Britain’s former ambassador to Washington. “But given the legacy Keir Starmer will inherit, you can’t rule out that someone on the right wing of the Tory party is likely to take advantage of a weak Labour government and come back to power in four or five years.”

For all its importance, Brexit has hardly become an issue in 2024. Analysts say this reflects voter exhaustion, a recognition among Conservatives that leaving the EU has damaged Britain’s economy, and an acceptance that Britain is not going to rejoin the EU in the near future.

“You’re not allowed to talk about Brexit because both parties are terrified of what will happen if you let the dog off the leash,” said Chris Patten, a former governor of Hong Kong and a Conservative politician who chaired the party in 1992, when it overcame a polling deficit to win a surprise victory over Labour.

Mr Patten said he doubted the Conservatives would be able to do it this time because of deep apathy among voters towards the party and differences between Mr Sunak and Prime Minister John Major in 1992.

Tory members of parliament also appear to share this sense of futility: around 80 of them have decided not to contest their seats, an exodus that includes Michael Gove, who once competed for party leader and has been at the centre of almost every Conservative-led government since David Cameron in 2010.

Frank Luntz, an American political strategist who has lived and worked in Britain, said elections in Britain and the United States are being driven less by ideological battles than by widespread frustration with the status quo.

“We are in a completely different world than we were in 2016,” Mr. Luntz said. “But one thing that is common on both sides of the Atlantic is a feeling that can be summed up in one word: enough.”