Britain has a hung parliament, after Labour's victory in Southampton Test made it impossible for any party to reach the 326 MPs required to achieve an absolute majority in the House of Commons.
An exit poll at 10pm last night correctly predicted that the Conservatives would lose their overall majority.
But what exactly is a hung parliament and what happens now?
What is a hung parliament?
A hung parliament means no party has won enough seats in a general election to have a majority in the House of Commons.
Who will be prime minister now?
Theresa May remains PM. In a hung parliament, the incumbent PM stays in office at Downing Street until it is decided who will attempt to form a new government.
How is this decided?
According to the Cabinet Manual, the incumbent PM is entitled to attempt to form a government then stay in office until Parliament meets, when they can ask MPs to approve his Queen’s Speech. Parliament is expected to meet for the first time after the election on Tuesday, June 13.
So Mrs May would be PM until Parliament meets again?
Not exactly. The Cabinet Manual also says that an incumbent government 'is expected to resign if it becomes clear that it is unlikely to be able to command that confidence and there is a clear alternative.'
That could allow Labour to argue that Mrs May should quit before a certain date if there is clearly an 'anti-Tory' majority in the Commons that would inevitably reject her Queen’s Speech and support Jeremy Corbyn as PM.
What would happen if Mrs May resigned?
Mr Corbyn would then be first in line to have the chance to form a government which would put its Queen’s Speech to the Commons to see if he could win the support of a majority of MPs.
Does a hung parliament mean another coalition government?
Not necessarily. A majority coalition is a formal agreement between two or more parties who between them have more than 323 MPs.
All the parties then get to provide ministers in the government.
But there are other options. A new PM could decide not to seek a coalition with any other party and instead rely on a 'confidence-and-supply' deal with smaller allies.
That means the smaller parties would support the government on financial matters like the Budget, and in confidence votes which would otherwise bring the government down.
The smaller parties wouldn't get ministerial jobs, but they would expect concessions on their chosen policies.
There's also the option of a minority coalition, where the governing party makes a formal agreement with a smaller party but together they still don't have a majority, meaning they have to seek support in the Commons for every vote.
Some Labour figures think their party might seek such a deal with the Lib Dems this time but Jeremy Corbyn has been very insistent that there will be no deals with other parties.
And Nicola Sturgeon suggested during the campaign that the SNP might be willing to prop up a Labour minority government.
Finally, a party that lacks a majority could simply try to go it alone and govern as a minority government, vulnerable to being voted down at any time and trying to win the support of other parties on an ad hoc basis for every vote. Minority governments rarely last long.
How long would it take to sort it all out?
How long would it take to sort it all out?
In 2010, the Conservatives and Lib Dems agreed their coalition in five days, largely because they were worried that financial markets would panic if Britain did not form a new government quickly.
But everyone involved now agrees that it was done too quickly, meaning some important decisions were botched. Any such talks this year could take much longer.
Could Mr Corbyn be PM even if Labour isn't the biggest party?
Yes. A PM simply has to command the confidence of the Commons: the size of his own party is constitutionally (if not politically) irrelevant.
The first Labour prime minister, Ramsay MacDonald, took office in 1924 even though Labour had fewer seats than the Conservatives and relying on the tacit support of the Liberals.
Would that be sustainable?
Possibly not. Prime Minister Corbyn would be vulnerable to being brought down by a combination of Conservative and SNP votes.
MacDonald’s government lasted only ten months before collapsing. Baldwin’s Conservatives won the October 1924 election handsomely.
Could we have a second election soon then?
It’s much less likely than it was in Baldwin’s day. The Fixed Term Parliaments Act, passed in 2011, means that if a government loses a confidence vote, alternative prime ministers get a 14-day period in which to form their own government. Only if a second confidence vote is lost is an early election held. Otherwise, the next election will come in May 2020.