FILE - In a Sept. 29, 2006 file photo, Fox News CEO Roger Ailes poses at Fox News in New York. Fox News Channel's parent company 21st Century Fox on Monday, July 18, 2016, says there has been no resolution to its probe into the conduct of network chief Roger Ailes, who is accused by a former network anchor of forcing her out because she refused to have sex with him.(AP Photo/Jim Cooper, File)

NEW YORK (AP) Roger Ailes is out as chief executive at Fox News Channel and Fox Business, his career at the networks 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.

Hours before the final night of the Republican National Convention, network parent 21st Century Fox announced Thursday that Ailes would resign immediately.

Rupert Murdoch, the executive chairman of 21st Century Fox, will assume the role of chairman and acting CEO of Fox News Channel and Fox Business Network until a replacement is named.

Murdoch and 21st Century Fox did not address the widening scandal in the statement on the resignation but lauded Ailes for his contributions.

“It is always difficult to create a channel or a publication from the ground up and against seemingly entrenched monopolies,” Murdoch said in a statement. “(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.”

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 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 Ailes 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.

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. 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.

“Rupert Murdoch is a conservative, but the Republican intensity, the conservative passion including the viciousness toward the Democrats that we now see against Hillary Clinton and has been going on against Obama all these years, all that is Roger Ailes,” said Paul Levinson, communications professor at Fordham University and author of the book “New New 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.

“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.

Bill Shine, Jay Wallace and Michael Clemente are current Fox executives who could be considered possible successors. 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.

KXAN.com provides commenting to allow for constructive discussion on the stories we cover. In order to comment here, you acknowledge you have read and agreed to our Terms of Service. Users who violate these terms, including use of vulgar language or racial slurs, will be banned. If you see an inappropriate comment, please flag it for our moderators to review.