“Nothing is agreed until everything is agreed,” EU negotiator Michael Barnier wisely observed. The EU and the UK made progress earlier today on setting the terms of the Brexit transition, which seemed to mainly go in the EU’s favor. But the final status of Northern Ireland and the need to avoid a hard border with the Republic of Ireland could still scuttle everything:

European Union and British negotiators on Monday agreed on the terms of the U.K.’s 21-month transition after it leaves the bloc next March, but left unresolved a thorny issue—the future of Ireland—that could derail the entire Brexit deal.

The new agreement opens the way for talks on the U.K.’s future economic and security relationship with the bloc, something the U.K. has long asked for. But while the transition was relatively easy to agree on, the most difficult phase of negotiations still lies ahead.

This agreement, if it holds, allows Theresa May to begin negotiations on a trading agreement with the EU. May needs to deliver a strong deal on trade and start work on other trade agreements that will come into force at the end of the Brexit transition in order to protect her governing coalition. The need to show results on future trade may have incentivized May to do some horse-trading in the short run:

Under the terms, agreed upon between the EU’s 27 national diplomats dealing with Brexit, the U.K. will follow its rules and continue to trade freely in the bloc’s common market until the end of 2020. It will no longer have a say over the bloc’s rules and regulations, but, in a concession by the EU, the U.K. will be able to negotiate and sign its own trade deals to come into force after the transition period ends.

For its part, the U.K. agreed that EU migrants who move to the U.K. during the transition period will have the same rights as EU citizens who arrived before Brexit.

That was one of a series of walkbacks that May will have to endure, the Guardian reports. The concession on migrants is going to cause May headaches, as she insisted that those coming to the UK during the Brexit transition had to be different, as they would be “coming to a UK they know will be outside the EU.” Given how important border control and migration was to the Brexit movement, that may be a bit tough for May to swallow, although it would only last for twenty months.

May will need to do some more explaining on the transition deal’s language on Northern Ireland. The enclave remains the biggest stumbling block to a final deal, and this transition might have made it even tougher for May to negotiate the next round. In December, the two sides had tentatively agreed to a draft that included a possible “back stop” of leaving Northern Ireland in the EU customs union, only to have the Democratic Unionist Party (DUP) strenuously object — and DUP is May’s governing partner in her coalition government. May insisted last month that the UK would never accept those terms as part of a final agreement.

Today, however …

After the publication of the last draft of the 53,000 word agreement, including that back stop, May had insisted that no British prime minister could sign up to a text including a proposition that could “threaten the constitutional integrity of the UK by creating a customs and regulatory border down the Irish Sea”.

The EU and Ireland had insisted, in turn, that the “back stop” option was simply the translation of an agreement struck in a joint report between the UK and the European commission in December. …

With the issue threatening to stall agreement on the transition period, a deal, however had been struck, Barnier told reporters.

He said: “We agree today that the back stop solution must form part of the legal text of the withdrawal agreement.”

Davis said: “Make no mistake, both the United Kingdom and the European Union are committed to the joint report in its entirety and in keeping with that commitment we agree on the need to include legal text detailing the back stop solution for the border of Northern Ireland and Ireland in the withdrawal agreement that is acceptable to both sides.

“But it remains our intention to achieve a partnership that is so close as to not require specific measures in relation to Northern Ireland and therefore we will engage in detail on all the scenarios set out in the joint report.”

Don’t expect the DUP to love this plan. They’ve been vocally opposed to any concessions that will force Northern Ireland into a different trading position than the rest of the UK. They wanted the “back stop” off the table entirely, but as long as it endures in negotiated deals even as an option, it’s going to look like the easiest way to avoid a hard border on the island of Ireland. So far, though, they’re keeping their powder dry:

The Democratic Unionist Party (DUP) is unconcerned by the UK government’s renewed commitment to a “backstop” solution avoiding a hard border post-Brexit, a party source has said.

The party, which keeps Conservative prime minister Theresa May in power at Westminster, has said her government had not changed its position on the EU’s draft legal text on the Withdrawal Agreement, and that it was unconcerned because vital sections have yet to be agreed.

“There is work to be done,” a DUP source said. “Work is ongoing.”

True enough, but it doesn’t appear that much has changed since December on the Northern Ireland question, and time is not May’s friend in this case. Barnier wasted no time in implying that the onus falls on the UK to find a better option:

It’s a complicated question, as the Belfast Telegraph explains:

Details not yet agreed between the EU and UK included:

– Measures creating an area without internal borders in which the free movement of goods is ensured and North-South cooperation between Northern Ireland and the Republic is protected.

– Prohibiting customs duties on imports and exports between the EU and UK specific to Northern Ireland, including duties of a fiscal nature.

– The banning of restrictions on imports and exports between the EU and Northern Ireland.

– Internal taxation rules.

– The application of EU law surrounding VAT and excise duties, agriculture, fisheries products and environmental protection to Northern Ireland.

Nothing is agreed until everything’s agreed — and the inability to find a workable solution acceptable to all sides on the hard-border question makes it appear that nothing’s agreed at all.