Britain’s Prime Minister Theresa May speaks during a news conference in London on Thursday. (Matt Dunham/AP)
Columnist

Correction: An earlier version of this blog post misstated the status of the Brexit agreement. May has negotiated it but not yet signed it. This version has been updated.

Finally, after many months and a million leaks, the 585-page Brexit agreement has been published. It is available and downloadable. Theresa May, the British prime minister, has finished her negotiations with the European Union.

To put it differently: Finally, after many months and a million leaks, May has made a choice from among all of the bad alternatives on offer. She has negotiated an agreement that is absolutely guaranteed to be unpopular and will make her unpopular. Already, members of her own party are calling for a vote of no confidence in her government. Two of her cabinet ministers have resigned, and more may be coming. The agreement may never pass the House of Commons; at the moment, it’s hard to see how it commands a majority.

And yet: Finally, after many months and a million leaks, it’s become clear that nobody could have negotiated anything better. There aren’t any better deals available.

She could have pulled the United Kingdom completely out of Europe’s single market and customs union. But that would have required her either to build a customs border across Ireland, or to create a de facto customs border in the Irish sea. Ireland, backed by the rest of the European Union, refused to accept the former. Many of the inhabitants of Northern Ireland, including May’s coalition partners, the Democratic Unionist Party, refused to accept the latter.

As a result, May has opted to stay inside the customs union, more or less, as a temporary measure, until something else can be negotiated. But in the agreement’s most astonishing passage, Britain has left this temporary arrangement wide open. May has agreed that the U.K.’s “status as a non-voting member of the E.U. in transition can be extended” beyond that date to … “31 December 20xx.” In other words, the U.K. stays inside Europe’s trading space until … whenever.

This deal offers something for everyone to hate. Brexiteers who promoted this debacle are angry because the deal means that Britain is indefinitely obliged to follow the rules of the European single market, yet will be unable to shape them. It might make it hard for the U.K. to pursue trade deals with anyone else. Trade flexibility, supposedly, the great advantage of Brexit, now becomes a distant dream.

Anti-Brexit campaigners are furious because the deal leaves Britain weaker and less influential than before. The Northern Irish hate it because it implies that they still might end up in a separate trading arrangement from the rest of Britain. The Scottish hate it because they would like a guarantee similar to the one that the Northern Irish have obtained. And so on.

But let me say it again: This is absolutely the best deal on offer. There isn’t anything else that works. Nobody is proposing anything better. None of the cabinet members who have quit have made any better suggestions. There isn’t an “ideal Brexit” that could be achieved, if only someone had the will to achieve it. The only other options are no deal — to simply crash out of all of the U.K.’s trading arrangements, with all the chaos that entails — or no Brexit.

In other words, the Brexit fantasy has finally tumbled to the ground. This is what a negotiated Brexit deal was always going to look like, and yes, it’s very ugly.

Read more:

Sebastian Mallaby: Britain has reached a new worst-case scenario on Brexit

Sebastian Mallaby: The case for a second Brexit referendum

The Post’s View: America should support Theresa May’s ‘soft’ Brexit