Matt Hancock resigned on Saturday as the UK's health secretary after breaking social distancing rules by allegedly hugging and kissing an aide during lockdown.
He will be replaced by Sajid Javid, the former chancellor, who said he was "honoured to have been asked to serve as Secretary of State for Health and Social Care at this critical time."
"I look forward to contributing to our fight against the pandemic, and serving my country from the Cabinet once again," Javid added.
Hancock's resignation came after tabloid newspaper The Sun published photos of Hancock kissing an aide at the Department of Health and Social Care. Hancock, who is married, was allegedly having an affair with Gina Coladangelo, who was a friend from university.
The newspaper said the photos were dated 6 May -- 11 days before the end of the UK's lockdown that included restrictions on contact with people outside one's own household.
Hancock said in a video statement posted to social media that he understood the "enormous sacrifices that everybody in this country has made."
"Those of us who make these rules have got to stick by them and that's why I've got to resign," Hancock said.
He thanked everyone at the NHS and in the vaccine programme and said he was proud of their response to the virus. He added that he would support the prime minister from the back benches.
Prime Minister Boris Johnson said he was “sorry” to receive Hancock’s resignation and that he “should leave office very proud of what you have achieved — not just in tackling the pandemic, but even before COVID-19 struck us."
But shadow health secretary Jonathan Ashworth said Johnson should have fired Hancock himself.
"Boris Johnson should have shown the guts, the spine, the judgement to have sacked him. You cannot have a health secretary breaking the rules in a pandemic when you need people to follow the rules," Ashworth said.
Hancock had faced weeks of pressure since the prime minister’s former top aide, Dominic Cummings, accused him of botching the government’s response to the pandemic.
Cummings himself was accused of breaking the rules and undermining the government’s “stay home” message when he drove 400 kilometres across England to his parents’ home during the spring 2020 lockdown.