— -- Fox News Chairman and CEO Roger Ailes has resigned from the company effective immediately, 21st Century Fox announced in a press release.
In a letter to 21st Century Fox Executive Chairman Rupert Murdoch, obtained by ABC News, Ailes emphasized that he was proud of his accomplishments and said that he was looking forward to working as an "adviser" with 21st Century Fox.
"I take particular pride in the role that I have played advancing the careers of the many women I have promoted to executive and on-air positions," he wrote, in part. "Fox News has become Number 1 in all of cable because I consistently identified and promoted the most talented men and women in television, and they performed at the highest levels."
According to the 21st Century Fox release, Murdoch will take over as chairman and acting CEO of Fox News Channel and Fox Business Network.
“Roger Ailes has made a remarkable contribution to our company and our country," said Murdoch. "Roger shared my vision of a great and independent television organization and executed it brilliantly over 20 great years."
He added: "I am personally committed to ensuring that Fox News remains a distinctive, powerful voice."
As Murdoch takes over, Ailes will be available to advise the chairman.
However, a corporate source told ABC News that the role will be informal and limited to advising Murdoch -- not Fox News directly -- and that Ailes will not be a regular fixture inside the organization.
“I think he’s agreed to it as part of his [leaving] deal,” said the source, who was speaking on the condition of anonymity because he was not authorized to speak publicly about the matter.
Ailes' resignation comes after former anchor Gretchen Carlson, a mainstay of the network for 11 years, left Fox News on June 23 and shortly afterward filed a lawsuit against her former boss. In it, she alleges that Ailes had “sabotaged” her career after she “refused his sexual advances,” and that her job was terminated in retaliation for rebuffing him and complaining to him about sexual harassment.
Fox News and Ailes have denied Carlson's allegations in the past.
"Gretchen Carlson’s allegations are false. This is a retaliatory suit for the network's decision not to renew her contract, which was due to the fact that her disappointingly low ratings were dragging down the afternoon lineup. When Fox News did not commence any negotiations to renew her contract, Ms. Carlson became aware that her career with the network was likely over and conveniently began to pursue a lawsuit.”
In an emailed statement late today, Carlson's lawyer, Nancy Smith, said, "Within just two weeks of her filing a lawsuit against Roger Ailes, Gretchen Carlson's extraordinary courage has caused a seismic shift in the media world."
She added: "We thank all the brave women who spoke out about this issue. We will have more to say in coming days as events unfold."
On Tuesday, New York magazine published a story citing unnamed sources who claimed that another Fox News host, Megyn Kelly, had “told investigators that Ailes made unwanted sexual advances towards her about  years ago.”
In an interview with ABC News on Tuesday, Susan Estrich, Ailes' lawyer, reaffirmed a written statement that she previously supplied, saying Ailes “never sexually harassed Megyn Kelly.” In the statement, she said that Ailes “has spent much of the last decade promoting and helping her to achieve the stardom she earned.”
Rupert Murdoch's sons, Lachlan and James Murdoch, who are 21st Century Fox's executive chairman and CEO, respectively, said of Ailes' resignation, "We join our father in recognizing Roger’s remarkable contributions to our company ... We continue our commitment to maintaining a work environment based on trust and respect. We take seriously our responsibility to uphold these traditional, long-standing values of our company.”
Fox News is owned by 21st Century Fox.
This is a breaking news story, please check back for the latest developments.