Theresa May’s two closest aides have quit in the wake of the disastrous General Election result.

The Prime Minister sought to shore up her position in Number 10 by sending her Chief Whip to lead talks with the Democratic Unionist Party.

Mrs May’s joint chiefs of staff Nick Timothy and Fiona Hill resigned in the wake of the election which saw Mrs May lose her Commons majority.

Why did Ben Gummer lose his Ipswich seat to Labour’s Sandy Martin?

The Prime Minister has made clear she wants support from her “friends and allies” in Northern Ireland’s DUP to secure her minority administration ahead of the Queen’s Speech on June 19 and has sent Gavin Williamson to Belfast to lead the talks.

The role of Mr Timothy and Ms Hill as Mrs May’s joint chiefs of staff had been severely criticised by disgruntled Tories in the wake of the election result.

Mr Timothy acknowledged that one of his regrets was the way Mrs May’s social care policy - dubbed the “dementia tax” - by critics had been handled.

The Prime Minister was forced to perform an unprecedented U-turn within days of the publication of the Tory manifesto by announcing that there would be a cap on social care costs, something that had been absent in the original policy document.

A full round-up of the General Election in Suffolk.

In a resignation message on the ConservativeHome website, Mr Timothy said: “I take responsibility for my part in this election campaign, which was the oversight of our policy programme.

“In particular, I regret the decision not to include in the manifesto a ceiling as well as a floor in our proposal to help meet the increasing cost of social care.

“But I would like to make clear that the bizarre media reports about my own role in the policy’s inclusion are wrong: it had been the subject of many months of work within Whitehall, and it was not my personal pet project.

“I chose not to rebut these reports as they were published, as to have done so would have been a distraction for the campaign. But I take responsibility for the content of the whole manifesto, which I continue to believe is an honest and strong programme for government.”

Meanwhile, as Mrs May sought to win backing for her Government, a Downing Street spokesman said: “The Chief Whip is in Belfast holding talks with the DUP on how best they can provide support to the Government. We will not be providing a running commentary.”

Mrs May was expected to make further appointments to her Cabinet on Saturday, but the damage to Mrs May’s standing makes it less likely she will risk alienating colleagues by carrying out an extensive reshuffle as she cannot afford to have disgruntled former ministers sniping at her from the backbenches.

After speculation the PM would use a solid win in the election to move Philip Hammond from the Treasury, he and other potential successors as Tory leader, Foreign Secretary Boris Johnson and Home Secretary Amber Rudd, remained in place.

With Brexit Secretary David Davis and Defence Secretary Sir Michael Fallon also staying put, there were suggestions changes could just centre on replacing the eight ministers who lost their seats as the Tory Commons tally fell to 318.

There was also unease within the party about the link-up with the DUP, which strongly opposes same-sex marriage and abortion.

Scottish Tory leader Ruth Davidson said she had demanded a “categoric assurance” that gay rights would not be affected by a deal with the DUP, which strongly opposes marriage equality.

Ms Davidson, who became engaged to partner Jen Wilson in May 2016, told the BBC: “I was fairly straightforward with her (Mrs May) and I told her that there were a number of things that count to me more than the party.

“One of them is country, one of the others is LGBTI rights.

“I asked for a categoric assurance that if any deal or scoping deal was done with the DUP there would be absolutely no rescission of LGBTI rights in the rest of the UK, in Great Britain, and that we would use any influence that we had to advance LGBTI rights in Northern Ireland.”

Tory MP Tom Tugendhat said: “I joined a party that introduced equal marriage, backs civil rights and defends freedom of faith. Those principles won’t be compromised.”

In an indication of the opposition to Mr Timothy and Ms Hill, former minister Anna Soubry called for them to be sacked while Mrs May’s former communications chief Katie Perrior, who left Downing Street when the election was called, hit out at their “rude, abusive, childish behaviour”.

Writing in The Times she said: “Mrs May condoned their behaviour and turned a blind eye or didn’t understand how destructive they both were.”

Amid reports that senior Tories were sounding out potential replacements for Mrs May, prominent Conservative MP Heidi Allen said the Prime Minister had six months at most left in Downing Street.

But former leader Lord Hague, writing in the Daily Telegraph, warned against a leadership contest: “Voters do not want further months of uncertainty and upheaval.”

Labour deputy leader Tom Watson said Mrs May was responsible for the election result, which saw her party fall short of a Commons majority.

He tweeted: “The adviser takes the fall but Theresa May is the one responsible for her own defeat.”

Shadow health secretary Jonathan Ashworth, who played a frontline role for Labour in the election campaign, said the Tories were in an “utter mess”.

He tweeted: “Top Theresa May advisor resigns. More chaos in the Tory Party, more weak & unstable govt. What an utter mess from this shower.”