Theresa May's decision to call a snap general election has backfired, with the Tories losing their majority in the House of Commons after a Labour surge confounded pollsters and resulted in a hung parliament.
The election has seen surprising results, with some big names – including former Liberal Democrat leader Nick Clegg and former SNP leader Alex Salmond – losing their seats.
Meanwhile, many MPs clung on to their seats or claimed victory by the tiniest of margins.
The SNP's Stephen Gethins won Fife North East by two votes.
The SNP's Stephen Gethins was re-elected by the skin of his teeth – winning 13,743 votes against the Scottish Liberal Democrat candidate Elizabeth Riches, who got 13,741 votes – a victory of just two.
It is the slimmest majority since the Liberal Democrats won Winchester in 1997.
The SNP's Pete Wishart won Perth and North Perthshire by 21 votes.
Pete Wishart, Scotland's longest-serving MP, waited through two excruciating recounts before he was declared SNP MP for Perth and North Perthshire.
He beat Conservative Ian Duncan by just 21 votes, a huge nosedive from his previous majority of over 9,000 votes in the 2015 general election.
Labour's Ian Austin won Dudley North by 22 votes.
The votes had to be counted three times in the early hours of Friday before Austin was re-elected as the MP for Dudley North, with a majority of just 22 votes. The Tories' Les Jones finished second on 18,068.
Austin has been MP for Dudley North since 2005, and in 2015's general election, he secured a majority of over 4,000 votes.
Labour's Paul Farrelly, for Newcastle-under-Lyme, won by 30 votes.
A Labour MP since 2001, Farrelly clung on with a majority of just 30 votes to beat the Conservative candidate, Owen Meredith.
Farrelly had won the seat by only 650 votes in 2015, and it was seen as a key Tory target this election.
The Conservative party's Royston Smith won Southampton Itchen by 31 votes.
There were three recounts before Royston's slender victory was declared.
The incumbent, defending the seat he won in 2015, received 21,773 votes to Labour candidate Simon Letts' 21,742.
The Conservative party's Zac Goldsmith won Richmond Park by 45 votes.
Former London mayoral candidate Goldsmith made a comeback in this election after leaving the Conservative party last year in protest over its plans for a third runway at Heathrow airport, triggering a local by-election.
He stood in that by-election as an independent candidate but lost to Liberal Democrat Sarah Olney, who beat him by a majority of almost 2,000 votes.
This time round, as a Conservative candidate once more, he won the vote but with a narrow victory of just 45 votes over Olney.
Labour's Laura Smith won Crewe and Nantwich by 48 votes.
Former Tory minister Edward Timpson lost the seat he had held since a 2008 by-election to Labour's Laura Smith.
She won 25,928 votes to his 25,880.
Sara Spary is a consumer business correspondent for BuzzFeed News and is based in London.
Contact Sara Spary at email@example.com.
Got a confidential tip? Submit it here.