Theresa May has says she will put together a government with the support of the Democratic Unionists to guide the UK through crucial Brexit talks.
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 felt “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 they fell short and must rely on the DUP to continue to rule.
In a short statement outside Downing Street after an audience with the Queen, Mrs May said she would join with her DUP “friends” to “get to work” on Brexit.
Referring to the “strong relationship” she had with the DUP but giving little detail of how their arrangement might work, she said she intended to form a government which could “provide certainty and lead Britain forward at this critical time for our country”.
“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.”
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”.
Later, she told reporters that she had “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.”
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.
Scottish Conservative leader Ruth Davidson has since sought assurances from Mrs May that any deal with the DUP will not affect LGBTI rights across the UK. Northern Ireland is the only part of the UK where same-sex marriage is not legal.
A source close to Ms Davidson, who is gay, told the BBC: “The PM needs to remember there are more Scottish Conservatives than DUP MPs.”