London: Prime Minister Boris Johnson on Friday hailed "a new chapter" in Britain's history as he signed its divorce treaty with the EU, clearing another hurdle before the country exits the bloc next Friday.
It allows Britain to end its decades-long membership of the European Union and leave its closest neighbours and trading partners after several years of domestic acrimony and delays.
"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," Johnson said in a statement.
"This signature heralds a new chapter in our nation's history," he added on Twitter, alongside a photo of the occasion.
Johnson signed the agreement in Downing Street, seated in front of two Union Jack flags, with European and British officials who had brought it from Brussels looking on.
EU chiefs Ursula von der Leyen and Charles Michel had already put their names to the treaty overnight at a ceremony held behind closed doors in the early hours of the morning.
It will now return to Brussels, where the original will be kept in EU archives along with other international treaties, while three copies will be dispatched back to London.
On Wednesday next week, the text will go to the European Parliament for ratification and on Thursday diplomats from the EU member states will approve the deal in writing.
Then, on Friday, January 31, Britain spends its last day in the EU before leaving the bloc at 2300 GMT as clocks strike midnight in Brussels.
In another move to prepare Brussels for relations with Britain as an outside power, the European Commission named an ambassador -- veteran diplomat Joao Vale de Almeida -- to London.
Earlier before dawn, chief EU Brexit negotiator Michel Barnier had watched as European Commission president Von der Leyen and European Council president Michel signed the treaty in the Council's headquarters.
"Things will inevitably change but our friendship will remain," Michel tweeted. "We start a new chapter as partners and allies."
The former Belgian premier, whose council represents EU member governments, added, in French: "I'm keen to write this new page together."
No reporters or photographers were allowed to witness the low key ceremony, despite news agencies offering to organise a pool.
Hours later Johnson signed the same document with a Parker fountain pen, as is traditional for ceremonial signings in Downing Street.
Staff including the prime minister's chief Brexit negotiator David Frost were present.
British voters backed leaving the European Union in a June 2016 referendum, and after lengthy negotiations and several delays Johnson's new government will finally "get Brexit done" next week.
Queen Elizabeth II gave her formal assent to the British withdrawal legislation on Thursday and the EU is now expected to complete the final formalities in the coming days.
Britain will leave the institutions of the union, reducing it to 27 member states, but the withdrawal agreement provides for an 11-month transition period until the end of the year.
During this time, Britain and the rest of the bloc will continue to apply the same rules of business to avoid economic disruption while officials try to negotiate a broader trade deal.
Most experts regard the idea that London and Brussels could agree a comprehensive free trade agreement in that time as ambitious.
But officials have expressed cautious optimism that some kind of agreement can be reached.
Formal trade talks are not expected to begin until the end of February or even March, and in the meantime Barnier has been in intensive talks with EU member states on his negotiating mandate.
After the transition, Britain wants the right to set its own rules in areas such as workers' rights and environmental standards.
But Brussels has warned that the more the UK diverges from EU standards, the less it will have unfettered access to Europe's huge single market.
And a comprehensive free trade agreement of the type the EU has signed with Canada could take years to negotiate.