Damian Green, one of Theresa May's closest allies, has been sacked from the cabinet after an inquiry found he had breached the ministerial code.
He was "asked to quit" after he was found to have made "inaccurate and misleading" statements over what he knew about claims pornography was found on his office computer in 2008.
He also apologised for making writer Kate Maltby feel uncomfortable in 2015.
Laura Kuenssberg said the PM "had little choice but to ask him to go".
The BBC's political editor said the departure of a close friend left Mrs May a "lonelier figure".
Mr Green, 61, who as first secretary of state was effectively the PM's deputy, is the third cabinet minister to resign in the space of two months - Sir Michael Fallon and Priti Patel both quit in November.
In her written response, Mrs May expressed "deep regret" at Mr Green's departure but said his actions "fell short" of the conduct expected of a cabinet minister.
Like Mrs May, Mr Green campaigned for Remain in last year's EU referendum and had been a leading voice in Cabinet for a "softer" Brexit.
He had been under investigation regarding allegations of inappropriate behaviour towards journalist and Tory activist Ms Maltby. He denied suggestions that he made unwanted advances towards her in 2015.
He also denied that he had either downloaded or viewed pornography on a computer removed from his Commons office in 2008 and said police had "never suggested to me that improper material was found".
In his resignation letter, Mr Green said statements he made about what he knew about the pornography could have been "clearer", conceding that his lawyers had been informed by Met Police lawyers about their initial discovery in 2008 and the police had also raised the matter with him in a phone call in 2013.
"I apologise that my statements were misleading on this point," he said.
Health Secretary Jeremy Hunt told BBC Radio 4's Today programme Mr Green had "lied" about "a particular incident" and that was why he had to go but it was a "sad moment".
Asked if his departure left Theresa May more isolated, he said "leadership is lonely" but she had shown "extraordinary resilience in very challenging circumstances" and was someone "who is capable of taking very difficult decisions".
An official report by the Cabinet Office found that public statements he made relating to what he knew about the claims were "inaccurate and misleading" and constituted a breach of the ministerial code.
The report also found that although there were "competing and contradictory accounts of what were private meetings" between himself and Ms Maltby, the investigation found her account "to be plausible".
Her parents, Colin and Victoria Maltby, said in a statement they were not surprised to find that the inquiry found Mr Green to have been "untruthful as a minister, nor that they found our daughter to be a plausible witness".
They praised their 31-year-old daughter for her courage in speaking out about the "abuse of authority".
Ms Maltby is not commenting on Mr Green's resignation until she receives more details from the Cabinet Office.
May a lonelier figure now
Analysis by BBC political editor Laura Kuenssberg
Damian Green has never been a politician with a huge public persona, or even a hugely well-known character.
But he was an extremely important ally of Theresa May. Not just a political friend but a genuine one, close to her for decades.
The government, so the joke in Westminster goes, has become "weak and stable", with number 10 taking back some control of the agenda in recent weeks.
So it is not likely that Mr Green's exit will suddenly unleash another bout of turmoil.
But the prime minister clearly took this decision very seriously.
She is a politician who guards her views, her own persona very closely. To lose one of the few who understood her, who she trusts, leaves her a lonelier figure.
In her reply, the PM said while the report had found his conduct to have been "professional and proper" in general, it was right that he had apologised for making Ms Maltby "feel uncomfortable".
Addressing breaches of the ministerial code, she added: "While I can understand the considerable distress caused to you by some of the allegations made in the past few weeks, I know that you share my commitment to maintaining the high standards that the public demands of ministers of the crown.
"It is therefore with deep regret that I asked you to resign from the government and have accepted your resignation."
Mr Green's political future has been in question since Ms Maltby claimed in an article in the Times that the minister "fleetingly" touched her knee in a pub in 2015 and in 2016 sent her a "suggestive" text message which left her feeling "awkward, embarrassed and professionally compromised".
Mr Green, an acquaintance of the journalist's parents, said the claims were "hurtful" and "completely false".
But they were referred for investigation by top civil servant Sue Gray - who is examining other claims that emerged during a swirl of allegations about harassment and other misconduct at Westminster.
The inquiry was subsequently expanded to consider claims that legal pornography was found on a computer removed from Mr Green's office in the House of Commons in 2008.
It was one of a number of possessions seized by the police during a controversial inquiry into the leaking of official documents by a civil servant to Mr Green, at the time a shadow Home Office minister under David Cameron.
Mrs May, who has known Mr Green since they were contemporaries at Oxford, brought him into the cabinet after she became PM in 2016 and promoted him to first secretary of state in July.
Since then, he has played a substantial role behind the scenes chairing key cabinet committees and has also deputised for Mrs May at Prime Minister's Questions.
It is not clear who will replace him in those roles but unconfirmed reports have suggested there will be no announcement until the New Year, with Parliament due to go on recess on Thursday.