Welsh politicians have welcomed news that Theresa May has struck a last-minute deal with the EU to move Brexit talks on to the next phase.
The prime minister promised "full alignment" of key regulations to prevent a "hard" border in Ireland.
First Minister Carwyn Jones claimed it meant that "whatever happens the UK will have an open border with the EU".
Welsh Conservative leader Andrew RT Davies said: "The job's been done and we're onto the next stage."
European Commission President Jean-Claude Juncker told an early morning press conference in Brussels on Friday that "the breakthrough we needed" had been achieved, after months of negotiations.
Talks on post-Brexit trade between the UK and EU can now go ahead.
The UK government has promised to guarantee "full alignment" of regulations that supported cross-border co-operation in Ireland and the 1998 Good Friday peace agreement if they were not delivered by any eventual UK-EU trade agreement.
An earlier deal was blocked on Monday by the Democratic Unionist Party (DUP), which claimed the border proposal would have treated Northern Ireland differently from the rest of the UK.
Mr Jones welcomed Friday's agreement, saying: "There's got to be one rule for everybody.
"What's clear now is that whatever happens the UK will have an open border with the EU.
"That is something, of course, that the Brexiters said wouldn't happen that has to happen."
He said the Irish government seemed "content" with the solution, "but what's not clear is what that solution actually means".
Welsh Secretary Alun Cairns said: "I pay credit to the PM who has diligently taken us through another major step in the negotiations.
"The UK government is committed to securing the best deal for the whole of the UK."
Plaid Cymru's Brexit spokesman Steffan Lewis said the talks had been a "wake-up call" for the UK government.
"After weeks of failure to unlock the next stage, they have managed to do so only by making a raft of concessions," he said.
"It remains to be seen how hard borders on Ireland and at Welsh ports will be avoided, but it is critical that this does happen."
UKIP Wales leader Neil Hamilton said it was "one step forward" that was "thanks to Arlene Foster and the DUP".
But Mr Hamilton claimed the prime minister had got a "feeble result", accusing her of "sacrificing our freedom to cut red tape" by promising continued alignment with EU rules.
Welsh Liberal Democrat leader Jane Dodds added: "Whilst this Brexit deal is welcome progress that makes a disastrous no deal Brexit less likely, there is no room for complacency."
What has been agreed?
- Guarantee that there will be "no hard border" between Northern Ireland and the Republic maintaining "constitutional and economic integrity of the United Kingdom"
- EU citizens living in the UK and vice versa will have their rights to live, work and study protected
- Financial settlement which is "fair to the British taxpayer"
Mr Juncker said: "Today's result is of course a compromise."
Negotiations had been "difficult for both the UK and the EU", he added.
Mrs May said getting to this point had "required give and take from both sides".
DUP leader Arlene Foster said she was "pleased" to see changes which mean there is "no red line down the Irish Sea".
But her party said there was "still more work to be done" before it could commit itself to backing the final Brexit deal.
Irish Foreign Minister Simon Coveney said the latest deal was a "very good outcome for everyone on the island of Ireland".