Updated from 7:37 a.m. with reports of a planned lawsuit and Cramer comment.

Viacom (VIAB) - Get Report CEO Philippe Dauman and board member George Abrams filed a legal complaint on Monday to remain part of the seven-person trust that will oversee 92-year-old media mogul Sumner Redstone's $40 billion media empire in the event that he dies or is becomes incapacitated, CNBC reported.

A lawsuit filed in a Massachusetts court by Dauman and Abrams would follow Redstone's announcement on Friday in a statement by his lawyer that he had removed both men from boards that oversee his trust as well as National Amusements, the privately held movie theater chain that owns a nearly 80% stake in Viacom and CBS (CBS) - Get Report .

If Dauman fails to reverse the decision, the Viacom CEO risks being forced out of the television and film company and losing a long-simmering battle with Redstone's daughter Shari for control of the company. Shari Redstone, Viacom's vice chairman and a board member, has been critical of Dauman's management of the company in recent years.

"This is incredibly important, because this is all about who's really in control of Viacom, and if Shari Redstone gets control of it, conceivably, Philippe Dauman, one of the most over-paid CEOs in the country, his whole gig could be, let's just say, you can't fire him out right, but I do not believe that he stays, not with that pay package," said TheStreet's founder Jim Cramer while at the New York Stock Exchange on Monday. "I'm sure that's something that Shari would get rid of immediately. On the other side, the enrichment of Philippe Dauman if they do win is rather extraordinary."

Shares of New York-based Viacom gained 3.3% midday Monday to $40.32 per share.

Dauman called the moves to replace him from the trust as "invalid and illegal," countering that Redstone lacked the capacity to have ordered those actions. Nonetheless, Dauman's apparent removal comes two weeks after a Los Angeles court ruled that Redstone was mentally competent to remove his longtime confidante from the trust.

Reuters on Sunday reported that Sumner Redstone was prepared to remove Dauman and Abrams from both boards and replace them with National Amusements general counsel Tad Jankowski and Jill Krutick, a family friend, the news agency said, citing sources familiar with the situation.

The seven-person trust has the power to make decisions affecting Viacom and CBS in the event of Redstone's incapacitation or death. The Viacom board in February added the title of chairman to Dauman's portfolio, replacing Sumner Redstone. Shari Redstone was the only board member to oppose the move.  

"Dauman's position as CEO could be called into question" as a result of Redstone's decision, said Credit Suisse media analyst Omar Sheikh in a May 22 investor note. "It is clear from public statements from the Viacom board that they fully support Dauman, but it is hard to see how they could prevent his removal if that is, in future, Redstone's wish."

A Los Angeles court determined on April 8 that Redstone was mentally competent to oversee his health needs. The case had been brought by Redstone's long-time companion, Manuela Herzer, who claimed that the media mogul was no longer mentally fit when he kicked her out of his estate in Beverly Park in October and removed her from overseeing his medical care. 

A statement from a lawyer identified as representing Sumner Redstone asserted that "Mr. Redstone acted after he expressed his concerns regarding Viacom's performance to Messrs. Abrams and Dauman, both Viacom directors, and received no response from them."

Los Angeles County Superior Court Judge David J. Cowan ruled in Redstone's favor following an 18-minute videotaped deposition that the judge determined demonstrated that the former Viacom chairman was able to make personal decisions. Had the court ruled against Redstone, it would have set in motion a potential transfer of his controlling stake in both companies to the seven-member trust.

In effect, Dauman is arguing that Redstone isn't capable of making independent decisions about Viacom despite the court ruling that he was mentally competent.

Abrams, a former Viacom executive, has supported Dauman even as the company's stock price has plummeted 54% over the past year and Viacom's revenue has declined for more than three years. Dauman's 2015 compensation exceeded $52 million, placing him among the world's highest paid executives of a publicly traded company. Dauman's compensation included a $17 million special award tied to a renewal of his employment agreement.

The statement from Redstone's lawyer also said he objected to the decision by Viacom's board to sell a minority stake in Paramount Pictures, its film studio. Dauman has said the sale of a minority stake is important to ensure that Viacom can continue to finance its debt and invest in its chief television properties -- MTV, Nickelodeon and Comedy Central. 

This latest public spat between Dauman and Shari Redstone, who has had her own rocky relationship with her sometimes volatile father, comes after Viacom has shown improving advertising revenue trends and succeeded in securing a renewal with Dish Networks (DISH) - Get Report .

"Viacom is making some operational progress especially on outside platforms and their technology stacks," wrote Wunderlich Securities media analyst Matthew Harrigan in an investor note on Monday. "But the new infighting at least temporarily supports the bears."

Cramer invoked the tussle as an example of the type of behavior fueling current political fires in America.

"What the big takeaway here is for me is that when Bernie Sanders talks to millennials, Gen-X, about this idea of greed, this is going to be exhibited," he said. "I think people have to recognize that this is what the country is so angry about, rich people squabbling over tens of millions of dollars while the middle class just struggles. I think these people should be a little more cognizant about the Shakespearean aspect of the craziness between Shari and Philippe."