Boris Johnson has heralded the end of "far too many years of argument and division" as he signed the Brexit Withdrawal Agreement ahead of Britain's departure from the EU next week.
The Prime Minister said the UK can now "move forward as one country" after he put his signature to the document in Downing Street on Friday afternoon.
Earlier in the day, the presidents of the European Council, Charles Michel, and the European Commission, Ursula von der Leyen, formally signed the agreement in Brussels.
The Queen gave royal assent to the legislation on Thursday after the legislation cleared both Houses of Parliament.
"The signing of the Withdrawal Agreement is a fantastic moment, which finally delivers the result of the 2016 referendum and brings to an end far too many years of argument and division," Mr Johnson said.
"We can now move forward as one country – with a Government focused upon delivering better public services, greater opportunity and unleashing the potential of every corner of our brilliant United Kingdom, while building a strong new relationship with the EU as friends and sovereign equals."
The PM signed the document with a Parker fountain pen in an anteroom outside the Cabinet Room in No.10, witnessed by EU and Foreign Office officials who transported the treaty from Brussels.
The European Parliament is now expected to vote to approve the agreement on Wednesday, paving the way for the UK to leave next Friday, January 31.
It will mark the start of an 11-month transition period, during which the UK will continue to follow EU rules, before the final break with Brussels at the end of the year.
Mr Johnson has said he wants to negotiate a comprehensive free trade deal with the EU by the end of the year.
However, Mrs von der Leyen and other senior EU figures have warned the Government's stated intention to end the UK's alignment with EU regulations means it will be impossible to achieve within such a tight timetable.