British Prime Minister Theresa May speaks June 6 at a campaign stop in Stoke-on-Trent. (Pool photo by Ben Stansall via Reuters)

She is a steely, tight-lipped daughter of a vicar who said on British television this week that the naughtiest thing she has ever done is “run through fields of wheat.” He is a thrice-married real estate mogul who busted the rules of American political decorum.

A match made in heaven it is not.

However, Theresa May, the Conservative prime minister, and Donald Trump, the Republican president, have been thrust together on the world stage. It is not a partnership that charms British voters, even as they recognize the importance of their country’s association with the colony-turned-superpower that helped bring peace to Europe after 1945.

The difficulty is that this superpower is now led by a president viewed by 64 percent of British adults as a threat to international stability, according to a Guardian poll. This suggests that not even domestic politics, separated from Trump by a vast ocean, can escape the shrapnel of his chaotic presidency.

Voters go to the ballot box Thursday to decide whether to strengthen May’s majority, mere days after a terrorist attack in the capital raised fresh questions about the Conservative’s record — and her willingness to distance herself from the American president. Trump used the attack to stoke fear and reopen a quarrel with the Muslim mayor of London, Sadiq Khan.

British Prime Minister Theresa May held hands with President Trump at the White House in January. (Christopher Furlong/Getty Images)

The Tory leader’s polling dominance has slipped in recent days, and while her ties to Trump are unlikely to dictate how people vote, they could compound other doubts about her leadership and credibility, political scientists and pollsters said. Numbers have been volatile going into the campaign’s final days, with one poll giving May only a one-point lead. Others still show a more yawning gap between May and her principal opponent, Labour’s Jeremy Corbyn.

In focus groups over the past six weeks, swing voters have raised the issue of “May’s cozying up to Trump” without being asked, said James Morris, a British pollster who used to work for the Labour Party. What disturbs them most is not his ideology or policies but his reputation as “a dangerous joke,” Morris said, and the sense that May is “aligned with someone who looks flaky and useless.” As her counterparts in Germany and France distance themselves from Trump, the unmistakable impression is that the British premier is his closest Western European partner.

Corbyn, as well as the Liberal Democrats’ Tim Farron, seized on Trump’s response to the attack to undermine May, with Farron accusing her of cultivating a “supine relationship” with the American president. Khan, meanwhile, joined calls for Trump’s state visit later this year to be canceled.

Boris Johnson, the foreign secretary, told the BBC the invitation to Trump would not be withdrawn, and the Conservatives otherwise did not respond Tuesday to a request for comment.

The vexed position in which Trump puts May with the British public also speaks to challenges that will outlast the election as Britain remakes its ties to Europe in a moment of uncertainty for transatlantic relations.

“Life, when it comes to international relations, is not always a bed of roses,” said Christopher Meyer, a former ambassador to the United States. “The political-personal relationships between American presidents and British prime ministers have been marked more by their volatility than their stability. When I look at Donald Trump, for all of his excesses, it does fit into a pattern where there has been quite severe oscillation between London and Washington since 1945.

A chasm divides the two leaders personally. Politically, however, May and Trump are tightly bound. They were both elevated by forces of populism roiling their countries last year. Now, May has been tasked with shepherding Britain out of the European Union, a split Trump championed from across the Atlantic. May clambered to Washington after his inauguration, becoming the first foreign leader to visit Trump’s White House — and, famously, held his hand as they walked along the colonnade. Hours after she left, the White House issued its executive order barring citizens from seven majority-Muslim countries from entry, and May drew criticism for equivocating about the American directive.

And when Trump yanked the United States from the Paris climate accord last week, inviting global outrage, she declined to sign onto a joint statement from the leaders of France, Germany and Italy affirming that the deal could not be renegotiated. She told him privately of her disappointment, her office said in a statement.

The dilemma became acute for May this week as Trump lashed out at Khan after the latest mass-casualty attack in Britain, the third in as many months. Asked by reporters about the spat, May expressed support for the mayor but seemed unwilling to counter Trump, ignoring questions about the president’s statements before offering, “I think Sadiq Khan is doing a good job, and it’s wrong to say anything else.”

“She’s stuck between a Trump rock and an E.U. hard place,” said Tim Oliver, an expert on British foreign policy at the London School of Economics with previous stints in the European Parliament and the House of Lords. “There’s no one single relationship she can seek to maintain with the rest of the E.U., but she can do this with the U.S.A. in the hope of maintaining some form of close relationship with a government that remains crucial to the U.K.’s place in the world and European security.”

Anne Deighton, a historian and international-relations theorist at the University of Oxford, said May “badly misjudged” the importance of bilateral relations with the United States and, in rushing to join hands with Trump, “failed to take time to assess first how things might go under his premiership.”

She noted, too, that she was “appalled” by the video of the two leaders holding hands.

“It makes me squirm as a citizen, a woman and a Brit,” she said.

Not all citizens feel that way.

Andrew Davis, who runs a hotel in London, said he sees tactical advantages in the relationship May has cultivated with Trump.

“You need cooperation between countries,” said Davis, 53, who said he might vote for the U.K. Independence Party, a far-right movement that championed Britain’s exit from the European bloc, simply because he is so dissatisfied with the major parties. He cheered Trump’s victory last year because it flummoxed the party establishment, but he acknowledged, “He talks a lot, doesn’t he?”

Isobel Foster, a student at Queen Mary University of London, said May’s position as Trump’s most loyal Western European partner adds to her distrust of the Conservative leader, but it’s not the central reason she will oppose her this week. She is more concerned, she said, about preserving funding for social care.