(CNN) — The pro-Trump cable outlet Newsmax and voting technology company Smartmatic settled a major defamation lawsuit Thursday in a last-minute agreement, averting a high-stakes trial over the airing of false 2020 election claims.

The terms of the settlement were not immediately known. The deal comes hours after jury selection got underway in a Wilmington, Delaware, courtroom ahead of opening statements scheduled for Monday. The parties, and a court official, announced the settlement Thursday afternoon.

“Newsmax is pleased to announce it has resolved the litigation brought by Smartmatic through a confidential settlement,” the network said in a statement.

Smartmatic lawyer Erik Connolly said in a statement that the company was “very pleased to have secured the completion” of the Newsmax case.

“Lying to the American people has consequences,” Connolly said. “Smartmatic will not stop until the perpetrators are held accountable.”

The closely watched trial would have been the first of several high-profile lawsuits filed against right-wing media companies in the wake of the 2020 election to reach a jury – and was set to determine whether Newsmax defamed Smartmatic by airing false claims the company’s machines had rigged the results against Donald Trump.

Newsmax denied wrongdoing and said its coverage was protected by the First Amendment.

After previous negotiations fizzled out, settlement talks heated up Thursday morning. While jury selection was underway, members of both sides’ legal teams were notably not in the courtroom as they privately hammered out a deal, a person familiar with the matter told CNN.

A loss at trial could have put Newsmax on the hook to pay tens of millions of dollars to Smartmatic, putting the small cable channel in financial peril.

“This is a case that is a bet-your-company case for Newsmax,” Howard Cooper, an attorney for the network, said at a recent pretrial hearing.

But in the run-up to the trial, Smartmatic’s hand weakened significantly, further raising the possibility of a settlement.

Smartmatic has claimed that the lies promoted by Newsmax, Fox News, and other Trump allies destroyed its reputation and cost the company billions of dollars. However, as the Newsmax trial approached, Smartmatic’s lawyers reduced the company’s damages claim to approximately $370 million, lowering their demands by about $1 billion, according to statements from both parties.

This drop was spurred in part by Delaware Superior Court Judge Eric Davis, who ruled Monday that Smartmatic could only seek compensation for provable losses, eliminating the possibility of additional “punitive damages” that might result in an eye-popping damages award.

Smartmatic also voluntarily abandoned efforts to seek damages for potential losses after 2023, because it would open the door to potentially devastating testimony about its executives being charged this year in an unrelated Philippines bribery scheme. (Smartmatic denies criminality.)

“Settlements are a common outcome in civil lawsuits, particularly just as the trial proceedings are about to begin,” said Eric Robinson, a media law expert who teaches at the University of South Carolina. “This is also true of defamation cases such as this one. It often makes sense to settle rather than pay the expenses of a trial and possible appeals.”

The settlement is the latest in a string of 2020 election defamation cases to reach an out-of-court agreement before trial. Fox News famously settled with Dominion Voting Systems last year for a record $787 million, and the far-right channel One America News settled with Smartmatic earlier this year.

Newsmax still faces a separate defamation lawsuit over similar claims that was filed by Dominion. Newsmax denies all wrongdoing in that case.

But perhaps the biggest lawsuit still looming over a media outlet for its repeated airing of 2020 election lies, is Smartmatic’s case against Fox News and its parent company, Fox Corporation, which is scheduled for trial next year.

“We are now looking forward to our court day against Fox and Fox News for their disinformation campaign,” Connolly, the Smartmatic lawyer, said in his statement Thursday.

Fox News denies wrongdoing, A network spokesperson called Smartmatic’s lawsuit “unsupported by the facts and intended to chill First Amendment freedoms.”

(Copyright (c) 2024 CNN. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)

Join our Newsletter for the latest news right to your inbox