NEW YORK (AP) — The #MeToo movement fighting sexual misconduct had already claimed one of Hollywood’s top movie moguls in Harvey Weinstein. Now it has done the same for Leslie Moonves, one of the television industry’s most powerful executives.

The CBS Corp. announced its chairman’s exit late Sunday, hours after The New Yorker magazine posted a story with a second round of ugly accusations against Moonves. A total of 12 women have alleged mistreatment, including forced oral sex, groping and retaliation if they resisted him. Moonves denied the charges in a pair of statements, although he said he had consensual relations with three of the women.

CBS said $20 million will be donated to one or more organizations that support #MeToo and workplace equality for women. That sum will be deducted from any severance due Moonves, a figure that won’t be determined until an outside investigation led by a pair of law firms is finished.

The network’s chief operating officer, Joseph Ianniello, will take over Moonves’ duties as president and CEO until its board of directors can find a permanent replacement, CBS said.

With about an hour before Monday’s opening bell, shares of CBS rose more than 3 percent, but they are down sharply for the year. Shares tumbled 6 percent in late July, the worst one-day sell off in nearly seven years, after details of the accusations surfaced.

It has been nearly a year since Pulitzer Prize-winning articles by The New York Times and the New Yorker exposed a pattern of misconduct by Weinstein, who now faces sex crime charges in New York. Matt Lauer, Charlie Rose and Kevin Spacey are among other figures that lost jobs after men and women came forward with their own stories, often on social media with the hashtag MeToo, about sexually inappropriate behavior by powerful men.

Moonves ruled first the programming, then the full network and other corporate entities such as Showtime for two decades. CBS has consistently been the most-watched network on television, even as changes transformed the industry, first with cable networks investing in shows and then streaming services like Netflix. He’s been paid handsomely for his success, earning just under $70 million in both 2017 and 2016.

Those paychecks made Moonves the second-highest paid executive in the S&P 500 among those holding the top job at their company for at least two consecutive years, according to an analysis by The Associated Press and Equilar, an executive data firm.

Yet accusations emerged against the affable, raspy-voiced former actor last month, when six women accused him of misconduct similar to what came out Sunday. CBS announced an internal probe yet Moonves, who was also involved in a separate power struggle that threatened his future control of the company, remained in charge. In recent days, however, reports leaked that the CBS board and Moonves, 68, were discussing an exit plan. Reports that it could include a multi-million dollar payout provoked some online anger.

The latest allegations were not addressed in CBS’ announcement of Moonves’ exit.

One of the accusers who came forth in the New Yorker’s article on Sunday, Phyllis Golden-Gottlieb, also filed a complaint with the Los Angeles police last year, but no charges were filed because the statute of limitations had expired. She said Moonves, while an executive at the Lorimar production studio in the late 1980s, pushed her head into his lap and forced her to perform oral sex.

At another time, she said an angry Moonves pushed her hard against a wall. When she resisted later advances, she began to be frozen out at the company, she said.

“He absolutely ruined my career,” she told The New Yorker.

Another woman, Jessica Pallingston, said Moonves forced her to perform oral sex on her first day working as his assistant at Warner Bros. productions. Other women told the magazine of unwanted touching or advances.

“He absolutely ruined my career.”

In a statement to the magazine, Moonves said the “appalling accusations” are untrue, but he acknowledged consensual relations with three of the women before he started working at CBS. Moonves was married at the time; he divorced his first wife and married CBS on-air personality Julie Chen in 2004.

“I have never used my position to hinder the advancement or careers of women,” he said. “In my 40 years of work, I have never before heard of such disturbing accusations. I can only surmise they are surfacing now for the first time, decades later, as part of a concerted effort by others to destroy my name, my reputation and my career. Anyone who knows me knows that the person described in this article is not me.”

In a second statement after his departure, Moonves said he was “deeply saddened” to be leaving the company and its employees. “Together, we built CBS into a destination where the best in the business come to work and succeed,” he said.

With Moonves’ exit, CBS viewers will wonder what the future holds for Chen, who is a panelist on the daytime show “The Talk” and host of the summer series “Big Brother.” She stood in support of her husband when the first allegations hit last month.

“I have never used my position to hinder the advancement or careers of women.”

Organizations that have supported women coming forward with stories of abuse, including Time’s Up and Press Forward, said Sunday that CBS should be transparent about the findings of its internal investigation despite Moonves’ ouster.

It’s difficult to imagine CBS without Moonves. The network was struggling when he took over as entertainment chief in 1995, hot from a job at the Warner Brothers studio, which developed hits such as “ER” and “Friends.”

He quickly turned things around and churned out programming appealing to the older, more tradition-bound CBS audience — broad appeal sitcoms such as “Everybody Loves Raymond,” ″Two and a Half Men” and “The Big Bang Theory” and procedural dramas such as “CSI: Crime Scene Investigation” and “NCIS.” ″Survivor” was an early reality show hit, and continues to this day.

Many CBS viewers knew Moonves from the relentless ribbing he took from former late-night host David Letterman. Moonves said there were legitimate hard feelings between the two in his early years, but the relationship warmed before Letterman’s retirement.

Moonves was an advocate for the traditional broadcast network model when others worried it was becoming obsolete, but he also launched streaming services for CBS entertainment and news. He took over the broader CBS Corp. in 2006 but kept his hand in entertainment duties, down to casting decisions for new shows.

His status as an industry king was never more evident than each year in May when CBS introduced the next year’s schedule before an audience of advertisers and media executives crammed into Carnegie Hall. He starred in each year’s presentation, often in elaborate filmed skits.

Yet this spring there were already signs the end was near. Locked in a battle for corporate control with Shari Redstone of National Amusements, Moonves received a standing ovation from an audience that sensed it could be his last year. He even skipped an event he created and relished, an annual breakfast meeting with reporters dubbed “Lox with Les.”

CBS’ board also announced Sunday that Redstone’s National Amusements will not propose a merger between CBS and Viacom, which Redstone had been urging, for two years. Six new CBS board members were also appointed.