The UK looks set to have a hung parliament with the Conservatives as the largest party, with most general election results now in.
It means Theresa May faces the humiliation of ending with fewer seats than when she called the election.
The Tories are projected to get 316 seats, Labour 265 and the SNP 34.
Labour leader Jeremy Corbyn called on Mrs May to resign – but she said the country needed stability and her party would “ensure” it was maintained.
Labour looks set to make 33 gains with the Tories losing 15 seats – and the SNP down by 22 seats in a bad night for Nicola Sturgeon, with her party losing seats to the Tories, Labour and Lib Dems.
The Conservatives are forecast to win 44% of the vote, Labour 41%, the Lib Dems 8%, UKIP 2% and the Greens 2%.
Mr Corbyn, speaking after being re-elected in Islington North, said it was time for Mrs May to “make way” for a government that would be “truly representative of the people of this country”.
He said he was “very proud” of the results so far, which he said were a “vote for hope for the future” and said people were “turning their backs on austerity”.
The Conservatives have said that in the event of a hung Parliament, Mrs May would get the opportunity to form a government first.
But there is a chance that the UK could be facing a fresh election later this summer under the rules in the Fixed Term Parliament Act.
Questions are also being asked about the potential impact on the upcoming Brexit negotiations and Mrs May’s own future, with one minister telling the BBC’s Laura Kuenssberg it was “hard to see how she could stay after these results”.
To get an overall majority, one party needs to get 326 seats, although in practice the Conservatives would be expected to be able to get a Queen’s Speech through with 318 MPs, if they had the backing of the 10 Democratic Unionist Party MPs.
Given that the Sinn Fein MPs will not take their seats, this means that the Conservatives and the DUP together should have 326 out of 643 MPs giving the two parties combined an overall majority of nine.
Conservative MP Anna Soubry, who is against Brexit, said it had been a “dreadful campaign” and Mrs May should “now consider her position”.
But her Brexit-supporting colleague Steve Baker said it was essential the party supported Mrs May to “provide all the stability we can”.
Speaking at her count in Maidenhead, Theresa May said the full picture had yet to emerge, but added: “At this time more than anything else, this country needs a period of stability.
“And if, as the indications have shown and if this is correct that the Conservative Party has won the most seats and probably the most votes, then it will be incumbent on us to ensure we have that period of stability – and that is exactly what we will do.”
DUP MP Simon Hamilton said his party’s votes were going to be “incredibly important” in the new Parliament and they would push to get “a good deal for Northern Ireland as we leave the European Union”.
Labour’s shadow foreign secretary Emily Thornberry told BBC News: “It is possible that we will form the next government.”
She ruled out a coalition, saying Labour would form a minority government in the event of a hung parliament, asking the smaller parties such as the Lib Dems and the SNP to support its programme in a Queen’s Speech.
Some big names have lost their seat in a night of upsets – Alex Salmond lost to the Conservative candidate in Gordon and former Lib Dem Leader Nick Clegg has lost his Sheffield Hallam seat to the Labour candidate.
In his defeat speech, Mr Clegg said Britain was now a “deeply divided and polarised” nation and he predicted the next Parliament faced the “excruciating task of trying to assemble a sensible government for this country”.
Former business secretary Sir Vince Cable retook his Twickenham seat for the Lib Dems moments later.
The party has ruled out going into coalition with either the Conservatives or Labour.
The SNP’s leader at Westminster, Angus Robertson, has lost his seat to Conservative Douglas Ross and the Tories also took Angus, in North East Scotland, from the SNP.
SNP leader Nicola Sturgeon said she was “disappointed” to have lost a number of seats but claimed her party had still “won the election in Scotland”.
She said she would like the SNP to “play a part in a progressive alternative to a Tory government” but would wait to see the final results.
Sorry, your browser cannot display this content.
Find your result
Enter a postcode or seat name
The BBC forecast suggests the Green Party would be unchanged with one seat and Plaid Cymru would still have three MPs, while the Lib Dems would gain five.
By BBC Political Editor Laura Kuenssberg
The conversations have started not just about whether the Tories will be able to form a government, but whether or not Theresa May can stay in her job.
There is no one prevailing mood inside the Tory party, as I write, Mrs May is holed up with her advisers inside Tory HQ.
But a former minister Anna Soubry has called for her to “consider her position” – political code for calling for her to resign.
Another senior MP tells me “I can’t see how she can stay”. A minister texts to say the Tory party is “absolute monarchy, ruled by regicide and that’s the territory we are in”. One Tory source says it is “50:50” that she will quit in the morning.
But others are urging caution, calling for reflection, a period of calm
Evening Standard editor George Osborne, who was sacked as chancellor last year by Theresa May, said, if borne out by actual results, the “catastrophic” exit poll figures would put Mrs May’s future as Conservative leader in doubt.
Green co-leader Caroline Lucas said she could “hardly dare hope” that the exit poll was right, adding: “To be clear, Greens will never support a Tory government.”
UKIP leader Paul Nuttall, who lost his bid to become the MP for Boston and Skegness, said: “If the exit poll is true then Theresa May has put Brexit in jeopardy. I said at the start this election was wrong. Hubris.”
A total of 650 Westminster MPs will be elected, with more than 45 million people entitled to vote.
Some votes had been cast before Thursday through postal voting, which accounted for 16% of the total electorate at the 2015 general election, when the overall turnout was 66%.