Theresa May has said she will put together a government with the support of the Democratic Unionists that can provide “certainty” for the future.
Speaking after visiting Buckingham Palace, she said only her party had the “legitimacy” to govern, despite falling eight seats short of a majority.
Later, she said she “obviously wanted a different result” and was “sorry” for colleagues who lost their seats.
But Labour said they were the “real winners”.
The Lib Dems said Mrs May should be “ashamed” of carrying on.
The Tories needed 326 seats to win another majority but, with 649 out of the 650 seats declared, they fell short and must rely on the DUP to continue to rule.
- General election: live updates
- What happens when no-one wins the election?
- Election 2017: Key points at-a-glance
- Can a Conservative and DUP pact work?
- How the Tory campaign went wrong
In a short statement outside Downing Street, which followed a 25-minute audience with The Queen, Mrs May said she would join with her DUP “friends” to “get to work” on Brexit.
She said she intended to form a government which could “provide certainty and lead Britain forward at this critical time for our country”.
Referring to the “strong relationship” she had with the DUP but giving little detail of how their arrangement might work, she said the government would “guide the country through the crucial Brexit talks” that begin in just 10 days’ time.
“Our two parties have enjoyed a strong relationship over many years,” she said.
“And this gives me the confidence to believe that we will be able to work together in the interests of the whole United Kingdom.”
Later, she told reporters that she “wanted to achieve a larger majority but that was not the result”.
“I’m sorry for all those candidates… who weren’t successful, and also particularly sorry for MPs and ministers who’d contributed so much to our country, and who lost their seats and didn’t deserve to lose their seats.
“As I reflect on the results, I will reflect on what I need to do in the future to take the party forward.”
A cabinet reshuffle, expected later today, looks likely to be pushed back to Saturday, says BBC political correspondent Eleanor Garnier.
Sources have told the BBC that Boris Johnson is expected to stay as foreign secretary, Philip Hammond as chancellor, and Amber Rudd as home secretary.
Those rarely seen on the campaign trail, including Andrea Leadsom, Priti Patel and Liam Fox, could be out, says our correspondent. Comebacks from Iain Duncan Smith, Michael Gove and prominent leave campaigner Dominic Raab were being floated, she adds.
DUP leader Arlene Foster confirmed that she had spoken to Mrs May and that they would speak further to “explore how it may be possible to bring stability to this nation at this time of great challenge”.
While always striving for the “best deal” for Northern Ireland and its people, she said her party would always have the best interests of the UK at heart.
It is thought Mrs May will seek some kind of informal arrangement with the DUP that could see it “lend” its support to the Tories on a vote-by-vote basis, known as “confidence and supply”.
Conservative MP Dominic Raab said the country needed “certainty and direction”, and an agreement between the Conservatives and the Democratic Unionist Party was the “only viable option”.
The BBC’s Laura Kuenssberg said the PM had returned to No 10 a “diminished figure”, having ended up with 12 fewer seats than when she called the election in April.
She had called the election with the stated reason that it would strengthen her hand in negotiations for the UK to leave the EU – the talks are due to start on 19 June.
But with the London seat of Kensington yet to declare, the Tories are on 318 seats, ahead of Labour on 261, the SNP 35 and the Lib Dems on 12. The DUP won 10 seats.
As it stands, the Tories and the DUP would have 328 MPs in the Commons, giving it a wafer-thin majority although as Sinn Fein will not be taking its seven seats, the new administration will have slightly more room for manoeuvre.
The Conservatives have argued in the event of a hung Parliament, Mrs May gets the opportunity to form a government first, as her predecessor David Cameron did in 2010 when there was also no clear winner but the party had comfortably more seats than their nearest rival.
Labour has said it is also ready to form a minority government of its own, after far exceeding expectations by picking up 29 seats in England, Wales and Scotland.
- Greens will ‘never’ support Tories
- Sturgeon says Indyref2 ‘a factor’ in SNP losses
- Election 2017: Record number of female MPs
But even if it joined together in a so-called progressive alliance with the SNP, Lib Dems, Green Party and Plaid Cymru, it would only reach 313 seats – well short of the 326 figure needed.
Sorry, your browser cannot display this content.
Mrs May has faced calls to quit from within her own party, with Anna Soubry saying she should consider her position after a “disastrous” campaign.
However, other MPs have urged her to stay on, with Iain Duncan Smith saying a leadership contest would be a “catastrophe”.
The BBC’s assistant political editor Norman Smith said the DUP did not regard Mrs May as a “permanent fixture” and this raised the possibility of a change in leader in the summer, given that he believed serious progress over Brexit was unlikely to be made before the German parliamentary elections in September.
Reacting to the result, European Council president Donald Tusk said there was now “no time to lose” over Brexit, while the European Parliament’s chief negotiator Guy Verhofstadt said it was an “own goal” and made negotiations more “complicated”.
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 later told the BBC it was “pretty clear who has won this election”.
“We are ready to serve the people who have put their trust in us,” he said – but he also stressed he would not enter into any “pacts or deals” with other parties.
Unite union leader Len McCluskey said Labour’s result was “an incredible advance” and it would not be long before they were in government.
- Analysis: What this means for Brexit
- How the world reacted
- Adler: EU Brexit concerns
- UK election: Six key lessons from a surprise result
The Green Party, which held its one seat at the election but saw its total vote halve, said a Conservative government propped up by the DUP would be a “coalition of chaos”.
In other major developments:
- The pound fell sharply as the markets opened
- Labour hailed a ‘fantastic’ result in Wales
- The SDLP and UUP were wiped out, losing all their seats
Gerry Adams, president of Sinn Fein, which gained three seats taking its total to seven, said it had been a “very good election for republicanism”, and appealed for “calm reflection” on how to go forward.
Lord O’Donnell, formerly the UK’s top civil servant, told the BBC that the prime minister had a duty to stay in post “for now” and had the right to seek the confidence of the House of Commons by asking it to approve a Queen’s Speech on 19 June.
Meanwhile, UKIP leader Paul Nuttall has quit after his party failed to win any seats and saw its vote collapse across the country.
In a night of high drama, the SNP remained the largest party in Scotland but lost 21 seats to the Tories, Labour and the Lib Dems. Leading figures in the party such as Alex Salmond and Angus Robertson were defeated.
Former Lib Dem leader Nick Clegg also lost his seat while Tim Farron clung on by less than 800 votes in his Cumbrian constituency.
But Vince Cable and Jo Swinson are among the Lib Dems returning to the Commons after winning their former seats back.
In more results from the night:
- Tory Zac Goldsmith regained his Richmond Park seat after two recounts
- Labour’s Diane Abbott won a huge majority of 35,139 in Hackney North & Stoke Newington
- Home Secretary Amber Rudd narrowly held her seat with a majority of just 346
- Tory MP Philip Davies said his party had made “a pig’s ear” of the campaign
- Fellow Tory MP Nigel Evans said his party had “shot ourselves in the head”.
Speaking after a mixed night of results for his party, Mr Farron paid tribute to Mr Clegg and the other MPs who lost their seats.
Mrs May had “put the future of the country at risk with arrogance and vanity”, he added, saying she should resign “if she has an ounce of self respect”.