He added that Britain would now allow European Union citizens moving to Britain during the transition phase to have the same rights to work and live in the country as those who arrived before, a policy London previously rejected.
The draft agreement has to be approved by the remaining 27 European Union countries, which could take place at this Friday's summit.
Britain and the European Union agreed on Monday to a transition period to avoid a "cliff edge" Brexit next year - though only after London accepted a potential solution for the border with the Irish Republic that may face stiff opposition at home.
The issue of the border between European Union member state Ireland and Britain's territory Northern Ireland is central to an agreement, but negotiators are struggling to find a way to keep people, goods and services flowing while respecting European Union controls.
"A joint legal text which constitutes in my mind a decisive step because we were able this morning to agree, and after all those days and nights of hard work, on a large part of what will make up an worldwide agreement for the ordered withdrawal of the United Kingdom".
The UK and EU hope that if and when a transition deal is agreed negotiations can focus on what sort of permanent future relationship the UK and EU will have with the aim of a deal being agreed in the autumn to allow time for EU member states and the UK Parliament to ratify it before Brexit next March.
"We agree on the need to include legal text detailing the "backstop" solution for the border", Davis told a news conference with Barnier.
And the United Kingdom will be able to negotiate trade agreements with outside countries during transition.
Britain and Europe have agreed to disagree on the two most formidable obstacles to a smooth Brexit, and to move on in the expectation that they will somehow be overcome.
Davis said Britain would be able to sign trade deals with other countries during the transition, despite European Union rules saying it should not be while subject to the bloc's customs rules.
Sterling climbed to $1.41 against the dollar and reached 87 pence against the euro on news of the deal.
This would mean Northern Ireland would stay in EU customs union and parts of the single market if no other solution was found.
Both sides are committed to keeping a free flow of people and goods over the intra-Irish border without returning to checkpoints, as during the three decades of violence in Northern Ireland.
Last month, as NPR's Lauren Frayer reported, U.K. Prime Minister Theresa May said that no British Prime Minister could ever accept that policy which would "undermine the U.K. common market and threaten constitution integrity of the U.K.by creating a customs and regulatory border down the Irish Sea".