Matt Hancock has resigned as health secretary after he breached social distancing guidance by kissing a colleague.
In a letter to the Prime Minister (PM), he said the government “owe it to people who have sacrificed so much in this pandemic to be honest when we have let them down”.
Boris Johnson said he was “sorry” to receive the resignation.
Former chancellor Sajid Javid has been confirmed as the new health secretary, Downing Street said.
Mr Hancock had been under increasing pressure to quit, after The Sun published pictures of Mr Hancock and Gina Coladangelo, who are both married with three children, kissing.
The newspaper said they had been taken inside the Department of Health on 6 May.
Fellow Tory MPs, as well as Labour and the Covid-19 Bereaved Families for Justice group, had called for the health secretary to be sacked and a senior Tory figure told the BBC that many MPs had told their whips on Saturday that he ought to resign.
She said Ms Coladangelo was also leaving her role as a non-executive director of the Department of Health.
In a video posted on Twitter, Mr Hancock said: “I have been to see the prime minister to resign as secretary of state for health and social care.
“I understand the enormous sacrifices that everybody in this country has made, that you have made, and those of us who make these rules have got to stick by them and that’s why I have got to resign.”
In his resignation letter, Mr Hancock, who served as health secretary for three years, reiterated his apology for “breaking the guidance” and he apologised to his family and loved ones for “putting them through this”.
In response, the prime minister said Mr Hancock “should leave office very proud of what you have achieved – not just in tackling the pandemic, but even before Covid-19 struck us”.
He added: “I am grateful for your support and believe that your contribution to public service is far from over.
Labour leader Sir Keir Starmer tweeted: “Matt Hancock is right to resign. But Boris Johnson should have sacked him.”
The SNP’s Westminster leader Ian Blackford tweeted: “Massive failure of leadership by Boris Johnson, Hancock should have been sacked.”
Liberal Democrats leader Sir Ed Davey tweeted that Mr Hancock’s legacy was one of “failure” and he said the fact that Mr Johnson “could just carry on regardless brings the prime minister’s judgement into question once again”.
Tory MP Andrew Bridgen told BBC News it had become clear that a “sizeable minority or even a majority of the public no longer had confidence in Matt Hancock”.
Mr Bridgen added it “was not the affair but the hypocrisy of being someone who makes the rules and then broke the rules”.
Rivka Gottlieb, from the Covid-19 Bereaved Families for Justice group, told BBC News it was “absolutely right” that Mr Hancock resigned but said she thought he should have been sacked months ago over his “appalling record”.
Concerns had also been raised about the process which saw Ms Coladangelo, a friend of Mr Hancock’s from their days at Oxford University, appointed to the role – last September.
A No 10 spokesman has insisted the “correct procedure” had been followed but refused to go into detail.
Mr Javid, who is also a former home secretary, quit his role as chancellor in February 2020, weeks before the budget after rejecting the prime minister’s order to fire his team of aides.
One of his first jobs will be to examine the data ahead of England’s proposed end to Covid restrictions on 19 July.