Sumner Redstone, then the executive chairman of CBS Corp. and Viacom, arrives at the premiere of ''The Guilt Trip'' in Los Angeles in 2012. Reuters/Fred Prouser

A trial over Sumner Redstone's mental competence appeared to come to an abrupt end Monday when a California judge threw out a lawsuit brought by the 92-year-old media mogul's former girlfriend, Manuela Herzer.

“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 as necessary,” the judge wrote in a tentative ruling.

Herzer, 52, contended that Redstone, the controlling shareholder of Viacom Inc and CBS Corp., was not mentally competent when he removed her as his designated healthcare agent last October.

A trial to decide the matter started on Friday and had been set to run through May 16.

(Reporting by Lisa Richwine; Writing by Bill Rigby; Editing by Sue Horton and Nick Zieminski)