"Roger Ailes has made a remarkable contribution to our company and our country," Rupert Murdoch said

Receive the latest national-international updates in your inbox

Fox News Channel Chairman and CEO Roger Ailes, seen in this 2012 file photo, resigned on Thursday, July 21, 2016, after several high-profile female employees at Fox News accused him of sexual harassment.

Roger Ailes is out as chief executive at Fox News Channel, his career at the network he built from scratch and ran with an iron hand for nearly 20 years over with stunning swiftness following allegations that he forced out a former anchor after she spurned his sexual advances.

Network parent 21st Century Fox said that Rupert Murdoch, the company's executive chairman, would run Fox News and its sister Fox Business Network, which Ailes had also led, until a successor could be found.

Murdoch and 21st Century Fox did not address the widening scandal in the statement on the resignation but lauded Ailes for his contributions. Ailes did not comment in the statement, and no details were given on a settlement agreement.

Cutting short a vacation, the 85-year-old Murdoch addressed Fox News employees in New York on Thursday. Details were not given on the settlement agreement for a contract that was supposed to run through 2018, but Ailes is expected to get a payment of at least $40 million.

Ailes will have no formal role in the company, but is expected to serve as an informal adviser to Murdoch, said a person familiar with the agreement who spoke on condition of anonymity because it is a personnel matter.

Fox is heading into a general election campaign in its customary spot at the top of the ratings, but without the man who sets its editorial tone every day. The announcement came on the day Donald Trump is to accept the GOP nomination for president, a speech likely to be watched by more people on Fox than any other network.

The blustery, 76-year-old media executive built a network that both transformed the news business and changed the political conversation. Fox News Channel provided a television home to conservatives who had felt left out of the media, and played a part in advancing a rough-and-tumble style of politics that left many concerned that it was impossible to get things done in government.

Ailes' downfall began with the July 6 filing of a lawsuit by Gretchen Carlson, who charged that he sabotaged her career because she refused his suggestions for sex and had complained about a pervasive atmosphere of sexual harassment at Fox. Ailes has denied the charges, but 21st Century Fox hired a law firm to investigate.

Several Fox employees jumped to Ailes' defense, but notably not Megyn Kelly, one of Fox's top personalities. In rapid succession, it was reported that Kelly was among other women who had told investigators about harassment — again denied by Ailes — and that corporate heads Rupert Murdoch and his sons, James and Lachlan, determined that Ailes had to go. The company has no plans to make results of its investigation public.

Within two weeks of the court filing, Carlson's lawyers also said more than 20 women had contacted the firm with stories of alleged harassment by Ailes either against themselves or someone they knew. Two came forward publicly.

Before the charges, Fox's sheer success had insulated Ailes despite some previous scrapes with the Murdoch sons over who he would report to. Fox News Channel is the parent company's single most important property, said Pivotal Research Group analyst Brian Wieser, with some estimates that it accounted for nearly a quarter of the company's profits.

Ailes was a prominent Republican media consultant who later ran CNBC before Murdoch asked him to create a cable news network to compete with CNN at the same time MSNBC was starting. Ailes' slogans, "fair and balanced" and "we report, you decide," appealed to an audience that believed mainstream outlets didn't live up to those promises.

"He was ahead of his time in recognizing that dividing, not uniting, an audience would be the key to commercial success in the 21st Century cable news business," said Matt Sienkiewicz, communications professor at Boston College. Ailes blew apart the notion that public affairs programming should target a broad audience with civil debates, he said.

Ailes hired a combative broadcast journeyman in Bill O'Reilly and turned him into the star of an opinionated prime-time lineup. He directed news coverage and emphasized issues like the so-called "war on Christmas" or the Benghazi investigation that otherwise got little attention. Republican politicians considered Fox the first stop for reaching their intended audience, and they learned to talk tough. "We're not going to be defensive about anything," Ailes said at the network's launch.

"It is always difficult to create a channel or a publication from the ground up and against seemingly entrenched monopolies," Murdoch said on Thursday. "(Ailes') grasp of policy and his ability to make profoundly important issues accessible to a broader audience stand in stark contrast to the self-serving elitism that characterizes far too much of the media."

He was also a showman. Fox had flashier graphics, brighter colors and a vitality its staid rivals lacked. The daytime show "Outnumbered" is a classic Ailes concept: four women in dresses, their legs prominently displayed, debating issues with a single male panelist.

In 2011, Ailes told The Associated Press that he hired Sarah Palin as an analyst — a decision that later gave him headaches — "because she was hot and got ratings."

Ailes demanded and usually received loyalty from a team that knew there could be hell to pay otherwise. When Paula Zahn left Fox for a job at CNN, Ailes retaliated by saying that a dead raccoon could have done her show and gotten the same ratings.

Critics scoffed at Ailes' promise that he'd lift Fox to first place. By 2002, he did, and Fox hasn't looked back.

Ailes groomed no obvious successors, and has been so identified with the brand that many have a hard time envisioning the network without him. Will his successor lack Ailes' political instincts, or tone down aggressive opinion? That could make Fox more broadly palatable, but also risks alienating the audience that has grown to love Fox and made it such a success.

Murdoch said Fox managers Bill Shine, Jay Wallace and Mark Kranz will assist him in day-to-day management of the network. Long-term, CBS News President David Rhodes is well-regarded and worked at Fox in the past. The Murdoch sons may also seek to make a statement by reaching outside the current Fox News culture.

"Whoever invented the Coca-Cola formula has long since passed this Earth, but the brand keeps selling because people like the taste," said Mark Feldstein, a journalism professor at the University of Maryland. "I think that's how it's going to be with Roger Ailes. He invented this winning formula and all you have to do is not mess with it too much and it will continue to mint money for you."

While ratings are soaring in an election year, a newly aggressive CNN is making inroads among younger viewers that advertisers seek. Fox faces the challenge of trying to inject youth into an audience that is among the oldest in television, and viewership is expected to inevitably fall without the excitement of a campaign.

The network has also been remarkably stable, with personalities bonded from loyalty to Ailes. O'Reilly has recently mused about retirement, and he and Sean Hannity reportedly have contract provisions that would allow them to leave if Ailes does. Kelly's contract ends later this year and it would be a huge blow to the network if she left.

AP Television Writers Frazier Moore in New York and Lynn Elber in Los Angeles and Business Writer Tali Arbel in New York contributed to this report.