A U.S. judge will dismiss Sarah Palin's defamation lawsuit against New York Times, although the jury is currently deliberating the case.

The ruling from U.S. District Court Judge Jed Rakoff marks a major victory for the Times, after Palin’s legal team argued a 2017 editorial defamed her by unfairly linking her to the 2011 mass shooting that killed six people and wounded then-Rep. Gabby Giffords. Rakoff said Palin had failed to show that the Gray Lady had acted out of malice, which is required in libel lawsuits involving politicians and other public figures.

A U.S. Judge will dismiss Sarah Palin's defamation lawsuit against New York Times

Rakoff said he will issue an order dismissing the complaint after the jury returns its verdict. The judge added that the case will inevitably be appealed and the court of appeals would benefit from knowing how the jury would decide it, which is why they will continue to deliberate. The jury will not be made aware of the judge’s order until after deliberations. 

An attorney for Palin did not immediately respond to a request for comment. 

Palin sued the Times for unspecified damages in 2017, accusing it of damaging her career as a political commentator with the editorial about gun control published after U.S. Rep. Steve Scalise, a Louisiana Republican, was wounded when a man with a history of anti-GOP activity opened fire on a Congressional baseball team practice in Washington.

SARAH PALIN GETS ASSIST FROM EX-NHL STAR RN DUGUAY AFTER PESTERED AT NYC RESTAURANT

In the editorial, the Times wrote that before the 2011 mass shooting in Arizona that Palin’s political action committee had contributed to an atmosphere of violence by circulating a map of electoral districts that put Giffords and 19 other Democrats under stylized crosshairs.

In a correction two days later, The Times said the editorial had "incorrectly stated that a link existed between political rhetoric and the 2011 shooting" and that it had "incorrectly described" the map. 

The Times has admitted wrongdoing but denied that it was done intentionally. 

NEW YORK TIMES BUILDING

U.S. District Judge Jed Rakoff sided with The New York Times. (Photo by DON EMMERT/AFP via Getty Images) (DON EMMERT/AFP via Getty Images)

Last week, Palin took the witness stand and provided a folksy overview of her family life in Alaska and ascent in Republican politics.

Palin, 58, described herself for jurors as a single mother and grandmother who "holds down the fort" for her family in Alaska when not advising candidates about "the good, bad and ugly" of politics. She also recalled the surprise over her emergence as a vice-presidential candidate in 2008, saying, "I don’t think they were prepared for me."

Her testimony came after former Times editorial page editor James Bennet characterized the disputed wording involving Palin as a "terrible mistake" on his part. He added: "We are human beings. We do make mistakes."

CLICK HERE TO GET THE FOX NEWS APP

A contrite Bennett admitted Wednesday that he botched the edit but intended no harm.

"I’ve regretted it pretty much every day since," he said, adding, "That’s on me. That’s my failure."

Palin resigned as Alaska governor in 2009 and has not formally sought office since.

Fox News’ Brie Stimson and the Associated Press contributed to this report.