Sarah Palin’s libel lawsuit against The New York Times will be dismissed, a US judge has ruled – despite a jury still deliberating the case.

In an abrupt twist to the trial, US district judge Jed Rakoff announced he will throw out the case when the trial ends, no matter what verdict the jury reaches.

Ms Palin, who was the 2008 Republican vice presidential candidate, has claimed the newspaper damaged her reputation with an editorial that falsely linked her campaign rhetoric to a mass shooting.

However, Mr Rakoff said the former Alaska governor failed to show that the news organisation acted out of malice, which is required in libel lawsuits involving public figures.

He added that jurors will still be allowed to reach their own verdict as he expects Ms Palin to file an appeal, but he plans to lodge a formal dismissal when the trial ends.

Speaking to reporters outside the courthouse, Ms Palin, said: “This is a jury trial, and we always thank jurors. We always appreciate the system.

“So whatever happened in there kind of usurps the system that I believe we are used to.”

More on New York

An ‘honest mistake’

The 58-year-old sued The New York Times in 2017 over an article about gun control, claiming it had damaged her career as a political commentator and consultant.

In the editorial, the newspaper wrote about a mass shooting that wounded former congresswoman Gabby Giffords and killed six others in Arizona in 2011.

It wrote that Ms Palin’s political action committee had contributed to an atmosphere of violence by circulating a map of electoral districts that put Ms Gifford and 19 others under “stylised crosshairs”.

The New York Times acknowledged that then-editorial page editor James Bennet had inserted wording that wrongly described both the map and any link to the shooting.

But the news organisation’s lawyers said he made an “honest mistake” that was never intended to harm Ms Palin.