LONDON — In Uxbridge and South Ruislip, on the western edge of greater London, many voters braved a cold December rain with one objective in mind: booting Boris Johnson out of his own seat and maybe also out of Downing Street.

There are ways Johnson could still hold onto power if he lost in Uxbridge, but it would most likely mean a stinging personal humiliation and mounting pressure to resign the premiership.

For a sitting prime minister to lose his own constituency would be an unprecedented development in British politics. It remains unlikely, but not impossible.

Although the seat has been Conservative for some time, Johnson’s lead has diminished in recent years. In 2017, during Britain’s last general election, he won Uxbridge and South Ruislip by a relatively small margin of just over 5,000 votes.

This year, a tactical voting operation has sought to unseat Johnson on his own turf, rallying forces behind Ali Milani, a 25-year-old local Labour Party candidate.

“This could be the very first time we unseat a sitting prime minister,” Milani told The Washington Post as he campaigned last month. “Right here, we have the power to stop Boris Johnson.”

In a video message released via Twitter on Thursday morning, Milani reiterated the stakes of the vote.

“Very rarely do we get an election like this, very rarely do we get an opportunity like this,” he said, “an election where we can have genuine change, when we can elect people who understand what it’s like to live like us.”

Alan Lomax, a 66-year-old Labour activist, praised the campaign Milani has run, which he said has shied away from demonizing Johnson. “There’s plenty to criticize about Boris Johnson. I wasn’t sure at first that this was the right thing to do — because Boris Johnson is so toxic to so many people.”

“I was struck from the very outset about how — what’s the right word? — ethical [Milani] was,” he said.

The prime minister does not live in the area — a fact many here pointed out as they stood in line to cast their ballots Thursday morning. And neither did he return to the community to vote.

In the 2010 general election, Gordon Brown traveled all the way to Scotland to vote in his home constituency of North Queensferry. In 2017, Theresa May voted in her home constituency of Maidenhead outside London.

On Thursday, Johnson voted in the constituency of Cities of London and Westminster, where the Conservatives were fending off a challenge from Chuka Umunna, who defected from the Labour Party this year.

“He doesn’t live here — he doesn’t live here at all,” said Mark, 48, who declined to give his last name because he said he was a British government employee.

“The Conservatives have destroyed the country over the past 10 years,” he added, noting that his vote was largely a rejection of the austerity measures the party had imposed. He said the fact of another general election was itself evidence of what he described as the chaos of a Conservative government.

“I think it’s funny that you only get one vote on Brexit, but this is the third general election in five years,” he said.

Rebecca Hawkins, 21, a student, said she was voting for Labour to protect Britain’s National Health Service. “The NHS is really important to me. Without rumors going around about Boris and selling it, I just couldn’t risk it.”

If Johnson lost Uxbridge, he would be the first sitting prime minister to be unseated in a general election, but it would not automatically spell the end of his political career. Strictly speaking, there is no law that requires the prime minister to be a member of Parliament, only a longstanding convention.

What the Conservatives would most likely do is find another party member from a safe seat who won by a comfortable margin to resign, probably in exchange for a seat in the House of Lords, according to the University College report. This would enable a by-election for that newly vacant seat, a contest in which Johnson could then stand as the Conservative candidate.

One slightly similar precedent occurred in 1963, when Alec Douglas-Home became prime minister after the resignation of Harold Macmillan for health reasons: for more than two weeks, Douglas-Home was a member of neither parliamentary house, and was ultimately elected to a parliamentary seat representing Kinross and West Perthshire.

But a by-election was not a self-evident strategy, either, said Meg Russell, director of the Constitution Unit at University College London. A hypothetical Johnson loss in Uxbridge would likely reflect a bad night for the Conservative Party across the country. In that case, party members would likely question the imperative of Johnson remaining leader, Russell said.

“All of these people, they just fought an election. To ask somebody to step down just after the election, that’s pretty tough,” she said.

There would also be the issue of timing, she said, given that the approaching Christmas holidays would in all likelihood mean that a by-election could not be held before late January at the earliest. In the meantime, Johnson would not be able to attend, speak or vote in the House of Commons. And Brexit would once again be thrown off track.

Some have also floated the idea that Johnson could lead the Conservative Party from a seat in the House of Lords, but Russell said that was even less likely.

“I think it’s inconceivable that he could be prime minister from the House of Lords,” she said. “The last time we had a prime minister in the House of Lords was over 100 years ago.”

On Thursday, Alan Murdoch, a 65-year-old retiree who was standing in the rain outside an Uxbridge polling place with his wife, said he hoped Johnson lost his seat.

“I think he’s an absolute buffoon,” Murdoch said. “Everyone says he’s educated, but he’s a buffoon and a liar and runs away from everything — that’s why he won’t be getting our vote.”

But Murdoch said he and his wife weren’t supporting Milani’s effort to oust Johnson. Although they usually vote Labour, this time they went for the Liberal Democrat candidate. He cited concerns about Labour having “gone too far to the left” and about anti-Semitism within the party.

Anne Baxter, 60, a homemaker in Uxbridge, said she voted Green as a protest.

“I don’t want Labour or the Conservatives in, and what’s going on with the environment should be taken be up by somebody,” she said.

“I quite like Boris. But I don’t believe any of them — I think everything they say is lies.”