The presidents of the European Commission and the European Council have signed off on Britain's EU divorce agreement.

With Ursula von der Leyen and Charles Michel's formal endorsement, the text will now go to the European Parliament on 29 January for ratification.

Then, on Thursday next week, diplomats from the EU member states will approve the deal in writing, ensuring Britain's orderly departure at midnight on 31 January.

"Charles Michel and I have just signed the Agreement on the Withdrawal of the UK from the EU, opening the way for its ratification by the European Parliament," Commission chief Ms von der Leyen tweeted.

In a separate tweet, Mr Michel said: "Things will inevitably change but our friendship will remain. We start a new chapter as partners and allies."

And he added, in French: "I'm keen to write this new page together."

Official photographs of the signing ceremony, conducted before dawn in the European Council's headquarters in Brussels, showed chief EU Brexit negotiator Michel Barnier looking on.

Britain's Queen Elizabeth yesterday gave royal assent to the legislation for Prime Minister Boris Johnson's Brexit deal, paving the way for the UK to leave the European Union with an agreement at the end of January - almost four years after 2016's Leave vote.

Mr Johnson hailed the crossing of the "Brexit finish line" after the EU Withdrawal Agreement Act passed into law, despite months of looming fresh negotiations with Brussels to agree a trade deal.

The UK is set to enter a transition period in February, during which the relationship with Brussels will remain the same while trade talks are finalised before the tight 31 December deadline.

Read More:
Brexit a step closer as Queen approves withdrawal act
Hogan upbeat on EU-UK trade deal post Brexit
Latest Brexit stories 

The UK government's withdrawal legislation cleared parliament on Wednesday after peers, who had tried to secure additional rights including for unaccompanied child refugees, bowed to the will of MPs once the elected chamber overturned their demands.

Mr Johnson said the nation would "move forwards as one United Kingdom", adding: "At times it felt like we would never cross the Brexit finish line, but we've done it.

"Now we can put the rancour and division of the past three years behind us and focus on delivering a bright, exciting future - with better hospitals and schools, safer streets and opportunity spread to every corner of our country."

EU names ambassador to post-Brexit Britain

Meanwhile the EU has named an ambassador to post-Brexit Britain, to take up his duties on 1 February.

Joao Vale de Almeida was previously Brussels' top envoy to the UN and to the US.

Early in his long career with the European Commission, Vale de Almeida was also on the team of spokespersons that fielded questions from journalists - including one Boris Johnson, who was a Brussels-based correspondent three decades ago and is now British prime minister.

The EU's foreign policy chief Josep Borrell announced in a statement that the appointment of an ambassador was necessary because, from February 1, "the United Kingdom will be a third country".

As a consequence, the EU will maintain in the UK a "delegation" - analogous to an embassy - just as it does in other non-EU countries such as Turkey, the US or Australia.

Vale de Almeida, a 62-year-old Portuguese national, is "the first head of the future EU delegation to the United Kingdom of Great Britain and Northern Ireland," Mr Borrell's statement said.

Britain had been notified of the appointment, he said.

As such, he will be a key figure watching over implementation of the divorce deal and in contributing to negotiations that will decide future relations between Britain and the EU.

During his time as EU ambassador to the US between 2010 and 2014, Mr Vale de Almeida participated in talks on an EU-US trade accord, the Transatlantic Trade and Investment Partnership, that US President Donald Trump ended up stopping.

Additional Reporting PA