Resisting calls for her resignation, Prime Minister Theresa May has said she will put together a government with the support of the Democratic Unionists (DUP) to guide the UK through crucial Brexit talks. Speaking after visiting Buckingham Palace on Friday, she said only her party had the “legitimacy” to govern, despite falling eight seats short of a majority, the BBC reported.

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”. 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 Liberal Democrats said 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, May said she would join with her DUP “friends” to “get to work” on Brexit. “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 UK,” May said.

It is thought May would 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”, the BBC report said. May told reporters that she had “wanted to achieve a larger majority but that was not the result”. “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 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”, the BBC reported. While always striving for the “best deal” for Northern Ireland and its people, Foster said her party would always have the best interests of the UK at heart.

Scottish Conservative leader Ruth Davidson has since sought assurances from May that any deal with the DUP would not affect LGBTI (Lesbian, Gay, Bisexual, Transgender, and/or Intersex) rights across the UK. Northern Ireland is the only part of the UK where same-sex marriage is not legal. A source close to Davidson, who is gay, told the BBC: “The PM needs to remember there are more Scottish Conservatives than DUP MPs.”