Brexit: UK leaves the European Union
The UK has officially left the European Union after 47 years of membership - and more than three years after it voted to do so in a referendum.
The historic moment, which happened at 23:00 GMT, was marked by both celebrations and anti-Brexit protests.
Candlelit vigils were held in Scotland, which voted to stay in the EU, while Brexiteers partied in London's Parliament Square.
Boris Johnson has vowed to bring the country together and "take us forward".
In a message released on social media an hour before the UK's departure, the prime minister said: "For many people this is an astonishing moment of hope, a moment they thought would never come.
"And there are many of course who feel a sense of anxiety and loss."
He said some had worried the political "wrangle" would not end but it was his job to take the country forward.
How did the UK mark the moment?
Brexit parties were held in pubs and social clubs across the UK as the country counted down to its official departure.
Thousands gathered in Parliament Square to celebrate Brexit, singing patriotic songs and cheering speeches from leading Brexiteers, including Nigel Farage.
The Brexit Party leader said: "Let us celebrate tonight as we have never done before.
"This is the greatest moment in the modern history of our great nation."
Pro-EU demonstrators earlier staged a march in Whitehall to bid a "fond farewell" to the union - and anti-Brexit rallies and candlelit vigils were held in Scotland.
Police in Whitehall arrested four men and also charged one man with criminal damage and being drunk and disorderly, while in Glasgow one man was arrested.
Meanwhile, other symbolic moments on a day of mixed emotions included:
- The Union flag being removed from the European Union institutions in Brussels
- The Cabinet meeting in Sunderland, the first city to declare in favour of Brexit when the 2016 results were announced
- A light show illuminating 10 Downing Street and Union flags lining The Mall
- A 50p coin to mark the occasion entering circulation
- The building of the UK government's delegation to the EU changed its name and sign
In Northern Ireland, the campaign group Border Communities Against Brexit staged a series of protests in Armagh, near to the border with the Irish Republic.
The Irish border - now the UK's land border with the EU - was a major sticking point in the Brexit divorce talks.
NI and the Irish Republic "will continue to remain neighbours", said NI First Minister Arlene Foster on RTÉ on Friday.
At 23:00 GMT, Scotland's First Minister Nicola Sturgeon tweeted a picture of the EU flag, adding: "Scotland will return to the heart of Europe as an independent country - #LeaveALightOnForScotland".
Ms Sturgeon is calling for a new referendum on Scottish independence, arguing that Brexit is a "material change in circumstances".
Speaking in Cardiff, Welsh First Minister Mark Drakeford said Wales, which voted to leave the EU, remained a "European nation".
Labour MP Hilary Benn, who chairs the Brexit select committee and backed Remain, said he was "sad last night... but we have to accept it".
He told BBC Radio 4's Today programme the UK was always a "reluctant" EU nation, adding: "We joined late and we left early."
What now? It's happened.
A dreary night didn't discourage those celebrating in Parliament Square. We wake this morning out of the European Union. But we follow their rules until the end of the year, without a say.
We are separate after more than 40 years, but remember much of the status quo will hold for now - the UK and the EU, the awkward couple, finally divorced - but still sharing a house and the bills.
But what the prime minister hails as a new era, a bright new dawn, starts months of hard bargaining with our neighbours across the Channel.
The UK's requests: a free trade agreement, cooperation on security, and new arrangements for fishing are just some of the vital arguments that lie ahead.
What happens now?
UK citizens will notice few immediate changes now that the country is no longer in the European Union.
Most EU laws will continue to be in force - including the free movement of people - until 31 December, when the transition period comes to an end.
The UK is aiming to sign a permanent free trade agreement with the EU, along the lines of the one the EU has with Canada.
But European leaders have warned that the UK faces a tough battle to get a deal by that deadline.
Former Brexit Secretary David Davis said agreeing a trade deal was "not a charitable exercise, this is an exercise of both sides recognising their own best interests".
"From today, we are their [the EU's] biggest export market," he told the Today programme.
What's the reaction in Europe?
In an open letter to the British people, French President Emmanuel Macron said he was "deeply sad" but: "The channel has never managed to separate our destinies; Brexit will not do so, either."
He also defended the way France acted in the negotiations, saying neither the French nor anyone else in the EU was "driven by a desire for revenge or punishment".
Meanwhile, the European Parliament's Brexit co-ordinator Guy Verhofstadt said he would "look after your star and work to ensure the EU is a project you'll want to be a part of again soon".
European Commission president Ursula von der Leyen has said Britain and Brussels will fight for their interests in trade talks.
She paid tribute to UK citizens who had "contributed to the European Union and made it stronger" and said the UK's final day in the EU was "emotional".
Whilst never the most enthusiastic member, the UK was part of the European project for almost half a century.
On a personal level, EU leaders tell me they'll miss having the British sense of humour and no-nonsense attitude at their table.
If they were to be brutally honest they'd have admitted they'll mourn the loss of our not-insignificant contribution to the EU budget too.
But now we've left the "European family" (as Brussels insiders sometimes like to call the EU) and as trade talks begin, how long will it take for warm words to turn into gritted teeth?
European Council President Charles Michel warned: "The more the UK will diverge from the EU standards, the less access to the single market it will have."
Mairead McGuinness, the vice president of the European Parliament, said she fears progress to agree a trade deal - which Mr Johnson hopes to secure by December 2020 - "might be left to the very last minute".
"Normally in trade negotiations we're trying to come together," she said. "For the first time we're going try and negotiate a trade agreement where somebody wants to pull away from us. I can't get my head around that and I think it's going to be quite complicated."
What about the US?
US secretary of state Mike Pompeo said he was "pleased" the UK and EU had agreed a Brexit deal and the US would continue to build its "strong, productive, and prosperous relationship with the UK".
Washington's ambassador to the UK, Woody Johnson, said Brexit had been "long supported" by President Donald Trump.
How did we get here?
Britain joined what was then European Economic Community on 1 January, 1973, at the third attempt. Two years later the country voted by an overwhelming majority to remain in the bloc in the first nationwide referendum.
Conservative Prime Minister David Cameron held another referendum in June 2016, amid growing pressure from his own MPs and Nigel Farage's UK Independence Party.
Mr Cameron led the campaign to stay in the EU but lost by the narrow margin of 52% to 48% to the Leave campaign, fronted by fellow Conservative Boris Johnson.
Mr Cameron's successor as prime minister, Theresa May, repeatedly failed to get her version of an EU withdrawal agreement passed by Parliament and was replaced by Mr Johnson, who also failed to get his plans through.
Mr Johnson managed to secure an early general election in December last year, which he won with an 80-seat majority on a promise to "get Brexit done".
The PM's EU withdrawal deal was approved by MPs just before Christmas, and the bill became law earlier this year.