British Prime Minister Theresa May outside 10 Downing Street in London on Friday. (Alastair Grant/AP)

UNABLE TO deliver a Brexit deal acceptable to both the European Union and to her own Conservative Party, which dominates Parliament, Theresa May announced her resignation as prime minister of Britain on Friday. She will leave behind a divided country whose political fragmentation is likely to be increasingly evident once results of Thursday’s European Parliament elections become public Sunday. She bears some responsibility for the division. But she also gets some credit, in our view, for at least having worked toward a solution, something that does not seem to interest many of Britain’s preening politicians today.

Certainly, Ms. May committed errors. Probably the most important was her decision, early on, to invoke Article 50 of the E.U. treaty, imposing a two-year deadline on separation talks with the European Union, before she had clarified her own bottom-line definition of Brexit and sold it to her party’s rank and file. She also undermined her own position by calling a snap election in 2017, expecting to bolster her majority and her bargaining position with Brussels; the election had the opposite effect.

These mistakes qualify Ms. May for some share of blame for Britain’s current mess. History will judge how much; in that competition, there will be numerous contestants, including surely her immediate predecessor, David Cameron, who called, and lost, the ill-advised 2016 referendum on the bad idea of Brexit in the first place.

Ms. May herself opposed Brexit, then, once the people voted for it, promised to make it happen with minimal disruption, a thankless and perhaps impossible task. The assumption of this responsibility, however competently or incompetently she managed it, redeems her somewhat in our eyes. Everyone criticizes the deal she struck with the European Union; Parliament has voted it down three times; and no doubt it is flawed, especially in its fudge of the all-important border between Northern Ireland and the Republic of Ireland, which remains in the E.U. But no one has yet provided a better alternative. When, finally, she turned to her political arch-enemy, the leftist Labour Party leader Jeremy Corbyn, for help in forging a compromise that might pass with votes from both Tories and Labour MPs, his response was the same as it has always been regarding Brexit: to do nothing and hope to turn the situation to his party’s advantage.

The scramble now begins to replace Ms. May and to salvage the situation before the new Brexit deadline of Oct. 31. It seems likely — especially if the Brexit Party does as well as expected in the E.U. elections — that the mantle of Conservative leadership, and with it the prime ministership, will pass to a more hard-line pro-Brexit figure such as former foreign secretary Boris Johnson. Whoever succeeds Ms. May, however, will confront the same unsquareable circles she did: There is no parliamentary majority for a compromise, but a new election might produce less clarity, not more. Britain cannot both leave the European customs union and maintain an open border on the Irish island. And if Britain does “crash out” of the E.U. without a deal, its very next task would be to negotiate a new economic relationship — with the E.U. The supposed bonanza of a sovereign, free-trading Britain, freshly aligned with the United States, is a myth. “ ‘Compromise’ is not a dirty word,” Ms. May implored her countrymen in her resignation speech. Alas, it still does not seem a terribly realistic prospect, either.