LOS ANGELES (Reuters) - Media mogul Sumner Redstone never set foot in the Los Angeles courtroom where his mental competency was on trial in recent days.

But the 92-year-old billionaire had the final word on Monday when Judge David Cowan, citing blunt videotaped testimony from Redstone, threw out a lawsuit brought by a former girlfriend challenging her removal from his healthcare directive.

“Redstone’s testimony has ultimately defeated her case,” Cowan wrote in a 17-page ruling that abruptly ended the lawsuit brought by the billionaire’s ex-companion Manuela Herzer.

The quick end to a months-long and at times salacious legal drama was a clear victory for Redstone and his daughter Shari over who should handle the mogul’s medical decisions.

If Herzer, 52, had proved her case, it could have triggered a chain of events that would result in the transfer of Redstone's controlling stake in media giants Viacom Inc VIAB.O and CBS Corp CBS.N to a seven-person trust that includes Viacom CEO Philippe Dauman and Shari Redstone.

Monday’s decision did not address Redstone’s ability to handle business matters at the two companies, where he controls roughly 80 percent of voting shares through his movie theater company National Amusements Inc. Any challenge to his competency to manage his shares would need to come from the trust.

The transfer of his shares to the trust is scheduled to take place upon his death unless he is found to be incompetent to manage them prior to that.

The judge’s dismissal means more uncertainty around the long-term future of CBS and Viacom, said Brian Wieser, an analyst at Pivotal Research Group.

“Yes, there is a plan for what happens when Redstone passes, but things remain as uncertain as they were before, in terms of the long-term implications,” he said.

Sumner Redstone, executive chairman of CBS Corp. and Viacom, arrives at the premiere of "The Guilt Trip" starring Barbra Streisand and Seth Rogen in Los Angeles December 11, 2012. REUTERS/Fred Prouser/File Photo

Redstone struggled to speak when questioned by attorneys for Herzer as part of her lawsuit, a transcript of his testimony shows, and a medical expert hired by Herzer said he believes the mogul suffers from moderate dementia.

Herzer’s attorneys say she plans to appeal the judge’s decision.

“Respectfully, he got it wrong,” Herzer attorney Pierce O’Donnell told reporters outside the courthouse. “That’s why we have appellate courts.”

SEPARATE LAWSUIT

Separately, Herzer filed a new lawsuit on Monday asking for at least $70 million in damages from Shari Redstone and Sumner Redstone’s nurses, alleging they interfered with her expected inheritance and invaded her privacy.

Redstone, in a statement, called Herzer’s new lawsuit “total fiction.”

Redstone attorney Robert Klieger said in a statement that his client was now “looking forward to liberating the $150 (million) in ‘gifts’” to Herzer and another former girlfriend.

Herzer’s case revealed intimate details about Redstone’s life inside his Beverly Park mansion. The ex-girlfriend claimed he was obsessed with having sex and that he clamored for steak, even though he was on a feeding tube and no longer able to chew or swallow.

After months of headlines, the trial ended after just one day of testimony and three witnesses, including Redstone.

Redstone repeatedly referred to Herzer as “a fucking bitch” in his 18-minute videotaped testimony, according to a transcript. When asked what he would like to happen at the end of the trial, he responded, “I want Manuela out of my life. Yeah.”

That clearly swayed the judge.

“There is no good cause for further judicial involvement where the court has now heard directly from Redstone that he has lost trust in Herzer, does not want her in his life and instead wants his daughter Shari to look after him if necessary,” Cowan wrote in his ruling.

Shares of Viacom, which owns MTV, Nickelodeon and Paramount Pictures, were down 2.2 percent at $40.43. CBS shares fell 2.9 percent to $56.01.

CBS executives have talked to investment bankers about how their CEO and executive chairman, Leslie Moonves, can gain more control over the company when Redstone dies or is declared mentally incompetent, sources have told Reuters.

Brett Harriss, research analyst at Gabelli & Co, which is the biggest owner of voting shares in Viacom Inc and CBS behind Redstone’s family, said he hopes that now Viacom’s management can focus on turning around its business.

“At the end of the day this was really all just background noise for both companies,” he said.