LONDON — It can be painful to watch, the sneers and scoffing heaped upon the lonely prime minister — and yet she soldiers on and on. Because this is her Brexit. Whatever happens next, good or bad, in this remarkable British moment will happen because of Theresa May.

In the past extraordinary weeks, as she has unveiled and defended her go-slow, half-in, half-out compromise plan for leaving the European Union, May has been accused of being a liar, a double-crosser and a traitor to the cause, while her Brexit plan has been condemned by even her friends as a humiliation.

The vicar’s daughter from Maidenhead says she is “doing the right thing, not the easy thing.” May insists that she is the one “to see this through.”

Those who have watched her over the years say it is May’s governing style, her character, her way of seeing the world that have produced this version of Brexit, as much as any red lines drawn by European negotiators.

May can be both notoriously steadfast or stubborn, take your pick, as well as secretive and tough, according to allies and critics. She can be a wooden campaigner, an uninspiring orator who sticks to a script. There’s nothing soaring or flamboyant about her, except her leopard-print shoes. She can’t abide talking about her feelings, especially on the BBC. She listens, studies, decides and then can’t be moved. She is all about details, about process.

May is not a big-picture person.

And so this considered, cautious Brexit, practical and provincial, is very much like the prime minister herself. 

It is miles away from the kind of cinematic, swashbuckling, go-for-it, “Global Britain” Brexit that former foreign secretary Boris Johnson craved.

That is why May’s Brexit is anathema to the hardcore Tory Brexiteers who this past week threatened a parliamentary coup, a no-confidence vote that would seek to strip her of power — because May’s vision tethers Britain to E.U. rules and regulations for years.

And yet. The plot against her appears to have fizzled, at least for now, with its plummy patrician leader in a bespoke double-breasted suit, Jacob Rees-Mogg, now cast as fool.

Rees-Mogg and his followers have “seemingly managed the impossible,” Guardian political-sketch writer John Crace observed. “In less than a week, they have made Theresa May appear vaguely plausible while relegating themselves to an embarrassing, long-past-its-best, music hall act.”

Describing a sparsely attended Rees-Mogg event festooned with signs reading “Global Britain,” Crace concluded, “Global Britain turned out to be seven old, white men waiting for the golf club bar to open.”

Since her disastrous performance in the 2017 general-election campaign, in which she lost the Tory’s majority and had to be propped up by a single-issue unionist party in Northern Ireland, May has been branded — by peers in the House of Lords and former colleagues who sat in the cabinet rooms at 10 Downing Street beside her — as “a dead woman walking” and “the worst prime minister in recent history.” 

And yet, May remains.

Her Brexit deal has survived the past two tumultuous weeks. That is saying something.

The nearly 600-page Withdrawal Agreement, which spells out the terms for Britain’s exit from the E.U. on March 29, is scheduled to be voted on by the leaders of the remaining 27 E.U. member states on Sunday in Brussels. 

The Europeans are expected to pass the plan in 90 minutes, barring derailment over fishing rights or the future status of Gibraltar.

Then the Withdrawal Agreement would return for a December vote in the British Parliament, where again its critics say May’s plan is doomed.

But is it, really? 

After her deal was savaged last week in Parliament — where barely a soul stood to support her — May confessed to the Daily Mail that it had been “a pretty heavy couple of days.”

The 62-year-old prime minister said her husband, Philip, her “rock,” made beans on toast and poured her a large Welsh whisky — and then she carried on.

Alan Duncan, a Conservative Party member of Parliament who went to Oxford University with May, told the prime minister he did not know how she could take the abuse heaped on her in the House of Commons. 

“And she just sort of shrugged her shoulders and said, ‘Well, on to the next thing,’ ” Duncan told The Washington Post.

“She is steadfast and she doesn’t get blown off course, and I think her steeliness is incredible,” he said. “She might not be the most exciting big character in the world, but, oh my God, those big characters would not have the same qualities she has been showing.”

Tim Shipman, the political editor of the Sunday Times and author of the best-selling “All Out War” about Brexit, said there is “absolutely a gender dynamic here, but it's not one where Theresa May is the victim.” 

Shipman said he saw a cabinet minister earlier this week who told him any man would have resigned if he had gone through what she has.

“Their egos would not be able to take it,” Shipman told The Post. “But her lack of ego and her desire to show these people, the fashionable people, the intellectual people, that she’s better than them? That is a strong part of her motivation — that and doing the right thing, in the practical, provincial English way.”

Shipman added, “What we don’t know is if she’s deftly guided the nation to a position of safety or whether, through being secretive and stubborn and annoying entire wings of her party, she’s sunk herself and the rest of us with it.”

May attested to her motivations Thursday in her remarks to Parliament. “Throughout these difficult and complex negotiations with the European Union,” she said, “I have had one goal in mind — to honor the vote of the British people and deliver a good Brexit deal.”

Her most persistent competitor, Johnson, quit the government in disgust in July over May’s Brexit plans. Now a backbencher and Telegraph columnist, Johnson most recently wrote that the prime minister’s proposed deal — under a headline calling it an “appalling sell-out” — “does nothing to cover the embarrassment of our total defeat.”

Johnson was just one of 20 government officials to abandon May to her fate. 

His brother Jo Johnson, who voted to remain in the E.U. in the June 2016 referendum, quit his post as transport minister this month, warning that May had lashed the country to a terrible choice — “vassalage” to faceless Brussels bureaucrats or the economic “chaos” of no deal, the “doomsday” scenario that threatens empty grocery-store shelves, shortages of medicine, and recession.

Her former Brexit secretary Dominic Raab, who also abruptly resigned, said Friday that May’s deal is “even worse” than remaining in the E.U.

Those who know May best, including former top aides, say the prime minister never subscribed to the idea that Brexit could be a glorious rebirth.

Instead she has sought to mitigate possible disaster after Britons voted 52 percent to 48 percent to leave the world’s richest free-trade zone.

May, who voted to remain in the E.U., said Thursday her deal “brings back control of our borders, our money and our laws. And it does so while protecting jobs, protecting our security and protecting the integrity of the United Kingdom.”

Her language reveals a defensive Brexit, a least-worst Brexit, an anxious Brexit, a better-than-nothing Brexit. 

“At least it ends the damaging uncertainty,” is the way a Financial Times column put it.

It may very well be the best available deal the Europeans would give her, but nobody seems to be very inspired by it. 

Nick Timothy, one of May’s former key aides, inveighed against May’s deal as a “capitulation” in the pages of the Daily Telegraph. 

Timothy was never far from May’s side until he was forced out when May stumbled in the last elections.

“If you believe people voted for Brexit to control immigration, and you fear it brings only economic downsides, you might consider the draft agreement the least bad outcome for Britain,” Timothy wrote. “If you believe Brexit can restore surrendered sovereignty, reform our economy and change the country, you will find it a horror show.”

Either way, Timothy warned, “it has no chance in the Commons.”

But he would not be the first to get the math wrong about May. 

Rosa Prince, author of “Theresa May: The Enigmatic Prime Minister,” said that May’s uncompromising, dig-your-heels-in style has not always gone down well with colleagues at Westminster but that the public has come to admire her grit.

May “seems reassuring and grown-up,” Prince said. “At last somebody who is prepared to take responsibility for things, and to show some leadership.”

Her biographer said May isn’t “unfeeling or blind or robotic” to the criticism levied at her. “She just has a strong ability to rise above that kind of thing,” she said. 

What May wants is respect, which is more important to her than being liked, Prince said.

When Conservative lawmaker Ken Clarke called May a “bloody difficult woman” — he wasn’t aware the camera was rolling — Prince said May “took that like a badge of honor, because he was treating her as an equal.”