THE deal seeks to resolve the so-called 'backstop', which has been a sticking point in the protracted negotiations.
The backstop position aims to guarantee no hard border between Northern Ireland and the Republic if this issue is not otherwise resolved through a future UK-EU trade deal.
Both sides have agreed to ensure the backstop is not necessary by coming up with alternative arrangements.
EU negotiator Michel Barnier told a press conference last night that if this is not possible by July 2020, the transition period could be extended – and if the issue is still not settled by the end of the transition, the backstop would "kick in".
This would involve a joint UK-EU "single customs territory", so that physical customs checks are not needed along the border.
Mr Barnier said the backstop position had "evolved considerably" and had been based on the UK's proposal.
He said the UK "would apply the EU's customs code in Northern Ireland" and this "would allow Northern Irish businesses to bring goods in the single market without restrictions which is essential to avoid a hard border".
Mr Barnier said the draft agreement made clear Northern Ireland would retain "unfettered market access to the rest of the UK".
"For competition to be open and fair in such a single customs territory we have agreed provisions on state aid, competition, taxation, social and environmental standards," he said.
"This will guarantee that both EU and UK manufacturing will compete on a level playing field.
"An essential condition for the single customs territory to cover fisheries... will be to agree between the union and the UK on access to waters and fishing opportunities."
The deal also covers other issues, such as a commitment on to protect the rights of EU nationals in the UK and vice versa to continue living, working and studying.
There is also the planned 21-month transition period after the UK leaves the EU in March 2019, and a 'divorce bill' for the UK which is thought to be about £39bn.