Britain’s endless, self-inflicted turmoil over Brexit has taken a fresh turn, with Prime Minister Theresa May’s new plan for a post-Brexit trade agreement and the resignations of key ministers from her government. May stands accused of betraying those who voted for Brexit, and her leadership might soon be challenged.

The prospect of a maximally disruptive “hard Brexit” draws ever closer.

Yet May’s plan, despite the upheaval in Westminster, might be the best hope for avoiding the chaos of such an exit.

After months of dithering, the prime minister has finally thrown her support behind a so-called “soft Brexit” — one that leaves much of the U.K.’s economic relationship with the European Union intact. She wants a free-trade area based on the E.U.’s rule book for goods. Together with a customs partnership (which would require the U.K. to collect tariffs on the E.U.’s behalf), this could remove the need for a physical border between Ireland and Northern Ireland — avoiding one of the greatest dangers aroused by this ill-conceived project — and allow close-to-frictionless trade in goods between Britain and Europe.

Services wouldn’t be covered — an enormous drawback for an economy like Britain’s, which depends on that sector. And the movement of people between the U.K. and Europe would remain contentious. For both reasons, May’s plan is plainly inferior to simply reversing the Brexit vote and remaining in the E.U.

Unfortunately, with time running out before exit next March, there’s little public support for a second referendum and no plausible path to that result. For now, a close economic partnership like the one May is proposing might be the best that can be done.

Assuming May can survive the attempts of Brexit zealots to force her from office, her future and that of the country will depend on the response of Europe’s leaders. Her plan splits the difference between a stripped-down free-trade deal and the so-called Norway option of full single-market membership. That isn’t to Europe’s liking. They’ve said that it must be one or the other, and that a deep and frictionless free-trade arrangement must be bundled with the single market’s free movement of people.

Europe’s leaders also argue that the customs scheme to resolve the Irish border while letting Britain strike trade deals with other countries just isn’t practicable.

They might be right, but Europe’s leaders should be flexible. As the resignations attest, May has given ground — as much as the politics allow, for the moment. If talks move forward in a constructive spirit, there will be scope for additional U.K. concessions on the movement of people (such as preferential arrangements for E.U. citizens), customs arrangements and other matters.

Abruptly dismissing May’s plan could spell the end of her government and make a no-deal Brexit more likely. That would hurt Europe as well as Britain and could poison future U.K.-E.U. relations for years. Europe should be willing to talk.