Rishi Sunak has apologised to the nation following the Conservative Party's general election defeat - the worst in its parliamentary history.
Sir Keir Starmer has led the Labour Party to a landslide victory and will take over from Sunak as the UK's prime minister.
Accepting responsibility for the result, Sunak said he heard voters' "anger" at his government.
"To the country I would like to say first and foremost I am sorry," he said.
"I have given this job my all but you have sent a clear message that the government of the UK must change, and yours is the judgement that matters.
"I have heard your anger, your disappointment, and I take responsibility for this loss."
Sunak delivered his speech outside Number 10, despite earlier rain - this time with a brolly on hand to avoid a repeat of his sodden election announcement in May.
Sunak said he would step down as party leader, adding "not immediately but once the formal arrangements for selecting my successor are in place".
- Liz Truss to become UK's next PM after winning Conservative race
- UK Prime Minister Liz Truss resigns after failed budget and market turmoil
- Boris Johnson, Rishi Sunak lead race to be UK's next prime minister.
- Political crisis creates unprecedented exit for Truss
Keep Reading
The MP for Richmond and Northallerton insisted there would be "an orderly transition" and also paid tribute to Sir Keir, whom he described as "a decent and public-spirited man who I respect".
Having said goodbye to staff in Downing Street just before his speech, Mr Sunak then got into a car with his wife Akshata to travel to offer his resignation to the King.
In an earlier victory speech in central London, Sir Keir said "change begins now", adding "it feels good, I have to be honest".
With nearly all results declared, Labour is projected to form the next government, with a majority of 174. Currently they have 412 MPs, up 211 from the last election.
The Tories are set for the worst result in their history. They have lost 250 seats and are currently on 121 seats.
Former Prime Minister Liz Truss - whose brief, disastrous time in office led to a slump in Tory support from which it never recovered - lost her South West Norfolk seat to Labour by 630 votes.
Truss saw her huge 32,988 majority overturned, with the Reform candidate coming third with 9,958 votes.
She is among dozens of senior Tories who have lost their seats, including Defence Secretary Grant Shapps, Commons leader Penny Mordaunt, Justice Secretary Alex Chalk and former minister Sir Jacob-Rees Mogg.
Foreign Secretary James Cleverly told the BBC a "large number of people who had previously voted Conservative have voted Reform" and the Conservatives now had to "think hard" about how to win back their support.
Former minister Steve Baker, long a thorn in the side of Tory leaders over Brexit, expressed relief following the news he had lost his seat after 14 years as the MP for Wycombe.
"Thank God, I am free - it's over," he said from the empty hall where the ballots had been counted overnight.
Reform UK leader Nigel Farage won a seat in Parliament at his eighth attempt, in Clacton, promising "this is just the first step of something that is going to stun all of you".
Reform has four MPs so far - including chairman Richard Tice and former Tory Lee Anderson - and has finished second in many parts of the country, taking large amounts of votes from the Conservatives.
In a victory speech in London, Sir Keir told cheering Labour supporters the country was waking up to "the sunlight of hope" which was "shining once again on a country with the opportunity after 14 years to get its future back".
He added: “Now we can look forward – walk into the morning.”
The Liberal Democrats have slightly fewer votes than Reform but have benefitted most from the Tory collapse, surging to a record 71 MPs, including the constituencies of three former Tory PMs - Boris Johnson, David Cameron and Theresa May.
Lib Dem leader Sir Ed Davey said: "This is a record-breaking night for the Liberal Democrats."
He added: "We will now work hard to keep that trust with a focus on the issues that matter most to them, most of all the NHS and care."
The Green Party of England and Wales now has four MPs, with co-leaders Carla Denyer and Adrian Ramsay among the winners.
But it has been a terrible night for the SNP, which has been reduced to just eight MPs so far.
Former Labour leader Jeremy Corbyn has defeated his old party to retain his Islington North seat as an independent.
But another high profile former Labour MP, George Galloway, failed to retain the Rochdale seat he won at a by-election in February, losing to Labour's Paul Waugh.
Sir Keir Starmer's landslide is short of the 179 majority won by Tony Blair in 1997, with its vote share across the country up by just 2%, largely thanks to big gains in Scotland, according to polling expert Sir John Curtice.
But it will mean a Labour prime minister in Downing Street for the first time since 2010 and a battle for the future direction of the Conservatives.
Penny Mordaunt, who lost to Labour by just 780 votes, had been tipped to make another attempt to be Tory leader after the election.
Admitting defeat, she said her party had lost because it "had failed to honour the trust people had placed in it".
Her message was echoed by Northern Ireland Secretary Chris Heaton-Harris, who told the BBC the Tories had “lost the trust of the British people by not delivering. That’s where it went wrong.”
He added: “We have to regroup and reconnect and actually just be a unified Conservative Party.”
The Conservatives have lost seats they have held since the 19th or early 20th century, across the shire counties of England.
Former attorney general Sir Robert Buckland, the first Tory MP to lose his seat as results began rolling in, told the BBC his party was facing "electoral Armageddon" and Labour's victory was a "big vote for change".
And he angrily lashed out at colleagues, such as former home secretary Suella Braverman, for what he called "spectacularly unprofessional and ill-disciplined" behaviour during the campaign.
"I'm fed up of personal agendas and jockeying for position," he added, warning that the upcoming Tory leadership contest was "going to be like a group of bald men arguing over a comb".
The SNP is "not winning that argument" on Scottish independence, said First Minister John Swinney.
"Opinion polls still show that about half the population in Scotland want our country to be independent," he told the BBC.
"That's not manifested itself in the election result tonight and that's something we've got to look at very carefully as a party and to think about how we can remedy that situation."