British Prime Minister Theresa May defends the “Brexit” agreement she reached with the European Union as “a decisive breakthrough.” A more honest description would be “making the best of a bad job,” the bad job being the disastrous decision by 52 percent of voters in 2016 to withdraw the United Kingdom from the E.U.

No one is particularly happy with the deal May’s government has cut, but if Brexit is going to go through, the agreement deserves to be approved by the British Parliament. That would allow the U.K. to leave the E.U. without an abrupt rupture in its trade with Europe and without jeopardy to the hard-won peace process in Northern Ireland. May shouldn’t be deterred by defections from her Cabinet or the possibility of a challenge to her leadership from dissidents in the Conservative Party.

Like many Europeans and, indeed, many U.K. residents, we’d like to see the whole Brexit deal undone in a national referendum or otherwise. But that seems increasingly unlikely.

The 585-page agreement reached by British and E.U. negotiators doesn’t permanently define future trade relations between the two parties. But it does provide for a gradual transition and contains complicated procedures to ensure that goods and people can travel freely between Northern Ireland, which is part of the U.K., and the independent Republic of Ireland, which will remain part of the E.U.

The fact that both the U.K. and the Republic of Ireland were members of the E.U. contributed significantly to the Protestant-Catholic peace process in Northern Ireland. That’s why preventing the return of a “hard border” between Ireland and Northern Ireland is essential.

To that end, the agreement contains provisions that, under some circumstances, could allow E.U. rules to be imposed on Northern Ireland that don’t apply to the rest of the U.K. Different treatment for Northern Ireland is anathema to some of May’s critics, including members of the Democratic Unionist Party of Northern Ireland, which has formed a governing arrangement with May’s Conservatives. One DUP member of Parliament warned that the deal would lead to “the breakup of the United Kingdom.”

But successive governments in London have recognized that Northern Ireland is a special case and that connections between the northern and southern parts of that island are important.

Brexit is a bad idea beyond its consequences for Ireland. It is a giant step backward for the post-World War II project of European integration. The goal should be a separation that causes the least disruption and disorder. That is what May is proposing.