UPDATED: A nasty protracted war for control of Viacom appeared over Thursday night, with a preliminary legal settlement that forced the ouster of embattled CEO Philippe Dauman and reasserted the power of frail patriarch Sumner Redstone, several sources said.

The initial agreement approved by Viacom’s board just after 8 p.m E.T. settles three separate lawsuits and makes chief operating officer Thomas Dooley interim chief executive of the conglomerate that controls MTV, Nickelodeon and Paramount Pictures, while also launching a search for a permanent replacement for Dauman, according to several sources.

The outcome appears to be a victory for Redstone’s daughter, Shari, a long-time Dauman critic who had supported (some said, “orchestrated”) her father’s split with the man who controlled Viacom for most of the last decade. Although the fate of the one-time corporate lawyer seemed sealed from the moment Redstone signaled his displeasure in May, Thursday’s board vote still marked a stunning coda for the executive who Redstone once lauded as “the wisest man I have ever known.”

Redstone’s rejection of his long-time right-hand was only one squall in a corporate tempest of Shakespearean dimensions – the loyal general turned aside for an alleged betrayal, Dauman shared the stage with the spurned daughter returned to the filial nest and the scorned former lover, echoing all the others in insisting that only she would protect the failing monarch and his legacy.

The fight for control of Viacom had neared a settlement before, only to disintegrate. Late Thursday night, hours after the board vote, the company had still not issued an expected press release, as some details of the proposed pact apparently had not been finalized.  Representatives for the company and for Redstone did not respond to requests for clarification.

Related Content Judge Moves Viacom Board Shake-Up to Trial, Sets Ground for Sumner Redstone Medical Exam

Dauman, 62, was long viewed as overpaid by his many critics on Wall Street. And the severance package that was supposed to be ratified in the settlement — reported by sources to be between $70 million and $80 million — is not likely to quell those protests.

The Viacom boss had seen his fortunes rise as the acquisitive Redstone built Viacom into a behemoth, with a market value that now stands at $19 billion. But his stature dipped precipitously, especially with the increasing struggle of the conglomerate’s sprawling cable television outlets against a regiment of new media competitors. With Paramount also falling at, or near, the bottom of the box office rankings in recent times, the company’s stock has declined more than 45% from its 2014 high of more than $88 a share.

The son of French immigrants will leave his post with the question of corporate succession still not entirely settled. While the agreement only guarantees Dooley the interim CEO position, it also makes him eligible to win the post permanently. But some insiders and most independent analysts believe that Viacom’s reconstituted board almost surely will turn to someone else.

One theory is that the Viacom board – including five new members who will take their seats once the settlement takes full effect, according to sources – will appoint CBS Corp. CEO and chairman Les Moonves to the same roles at Viacom.

CBS and Viacom had been joined as a single corporation until 2006, when Redstone cleaved the two into separate operations, saying that they needed to be more nimble and specialized in a new media landscape tilted toward digital programming. While there has been speculation that CBS and Viacom could be rejoined, most observers believe that would present too many governance and value complications.

Moonves’s elevation would seem to solve, at least temporarily, concerns about Viacom’s flagging performance. The one-time actor is known to be a favorite of Shari Redstone, 62, the former prosecutor and tech investor who sits on the boards of both of the family companies and is viewed as having an outsized role in their future. Shari has long touted Moonves’s management skills and business savvy, in contrast to those of Dauman, who she viewed as overly cautious. The Redstone heiress was seen huddling with Moonves at this spring’s Allen & Company moguls retreat in Sun Valley Idaho.

While Shari is viewed as holding a potent position, the settlement and her father’s previous succession plans do not give her outright control. She will have to win approval for any changes at Viacom from a board newly remade by her father in June with the appointment of five new directors — Kenneth Lerer, chairman of Buzzfeed; former Sony exec Nicole Seligman; former Discovery CEO Judith McHale; Bank of America alum Thomas J. May and former DreamWorks COO Ronald Nelson.

That group’s vast corporate experience and savvy in both technology and entertainment is expected to make it a much greater force in setting a new strategic direction than the old board. An independent streak could reinforce an admonition that Sumner Redstone often made to his corporate appointees — he wanted them to remain in firm control of both Viacom and CBS and not to turn the reins over to Shari, or any of his other relatives. (Redstone has not spoken publicly in months, so his current sentiments about the succession of Shari and other family members are not known.)

Among others previously mentioned as possible contenders for the permanent CEO post at Viacom, if Moonves does not grab the job: one-time News Corp. President and COO Peter Chernin, former Viacom boss Tom Freston, outgoing DreamWorks Animation boss Jeffrey Katzenberg, former Sony Pictures Television chief Steve Mosko and Seligman, one of the newly-appointed Viacom board members, who previously served as president of both Sony Entertainment and Sony Corporation of America.

Among the most pressing decisions for the new Viacom regime – what to do about Paramount Pictures, once the home of “The Godfather,” “Chinatown” and “Titanic,” but more recently master of such mediocre retreads as “Teenage Mutant Ninja Turtles: Out of the Shadows” and “Zoolander 2.” The studio is only fractionally ahead of Sony for last place in domestic box office so far this. It finished dead last in 2015, barely ahead of mini-major Lionsgate.

Dauman had advocated selling a 49% stake in the studio that he once helped Redstone acquire. But Sumner Redstone’s representatives insisted that the nonagenarian had no interest in selling the “baby” that they believed still has the potential to be a corporate lodestar.

Viacom’s fortunes have been closely tied to Redstone’s for decades and that proved to be a challenging combination last year, when the first in a series of court cases brought the billionaire’s fragile health into the public arena. The case began just before Thanksgiving, when former lover and longtime companion Manuela Herzer said she had been improperly forced out of Redstone’s Beverly Park home.

The Argentinian-born socialite filed papers demanding to be restored as Redstone’s healthcare agent — the person empowered to oversee his care in the event he became incapacitated. Herzer charged that Redstone had lost much of his once-prodigious brain function, creating an opening for Shari to manipulate her father into kicking Herzer to the curb.

Shari Redstone’s lawyers said the exact opposite was true — that Herzer and another longtime companion, Sydney Holland, had taken control of the magnate’s life and coerced him into giving the two women $150 million in cash and gifts.

Redstone gave a deposition in the case via videotape and angrily rejected any connection with Herzer, using an expletive multiple times to say he wanted the younger woman permanently out of his life. Although he spoke haltingly and, at times, semi-coherently, a judge ruled that Redstone’s intentions were clear. He threw out Herzer’s case. Subsequent appeals were also turned aside.

Though Redstone won the day, the public exposure of his weakened state (Herzer’s lawsuit described him as a shut-in who appeared to be “a living ghost”) opened a public discussion about his ability to continue as executive chairman of both Viacom and CBS. A troupe of shareholders sued, charging that it was improper to pay an executive who was obviously so impaired for work he could not perform.

The end of the Herzer litigation seemed to newly energize Redstone or — as Herzer, Dauman and others would argue — to embolden Shari to work with more fervor to remake the family business. Though she had made some success with investments, particularly through a firm she founded to finance technology companies, her father had previously said he did not want his daughter running his $40 billion corporate empire when he was gone. Shari’s representatives countered that she has never been anything other than the loyal offspring, trying to push for what is best for her both CBS and Viacom.

The stakes in the corporate battle became clear in May, when Sumner ousted Dauman and fellow Viacom board member George Abrams from two panels that are crucial in overseeing his empire — the board of National Amusements, the theater chain that also is a vehicle for holding Viacom and CBS stock and the trust that will oversee his shares in the company, when he dies or is deemed incapacitated. National Amusements holds nearly 80% of the voting shares of CBS and Viacom.

The following month, Redstone and the people around him moved to oust five veteran members of the Viacom board, replacing them with the newcomers. That action was held in abeyance pending the outcome of the litigation in Delaware’s Chancery Court. But with Thursday’s settlement, the path has been cleared for the new board to be seated immediately.

Also terminated by the settlement are two other lawsuits. One was filed in Massachusetts by Dauman and Abrams – seeking to reverse their ouster from the National Amusements board and Redstone trust. The other was filed by Redstone in Los Angeles, seeking affirmation of the Dauman and Abrams ouster.

Discovery was underway in the Massachusetts case and Judge George Phelan’s decision to move the trial date in that case from October to September 19 created additional urgency for the combatants to settle. Redstone was said to want to avoid another deposition, like the one in the Herzer case, which exposed his frailties to the world. Dauman could not have welcomed further scrutiny of his record by a new board — one seated by the one-time mentor who turned against him.