NEW YORK — A federal judge on Tuesday tossed out a defamation lawsuit by Sarah Palin against The New York Times, saying the former Alaska governor failed to show the newspaper knew it was publishing false statements in an editorial before quickly correcting them.

The written ruling by Judge Jed Rakoff in Manhattan said the lawsuit seeking unspecified damages “fails on its face to adequately allege actual malice.”

“What we have here is an editorial, written and rewritten rapidly in order to voice an opinion on an immediate event of importance, in which are included a few factual inaccuracies somewhat pertaining to Mrs. Palin that are very rapidly corrected,” the judge said. “Negligence this may be; but defamation of a public figure it plainly is not.”

The decision came weeks after the onetime Republican vice presidential nominee sued over an editorial titled “America’s Lethal Politics.” The editorial was published in June after a gunman opened fire on Republican lawmakers in Virginia, wounding Rep. Steve Scalise.

The Times’ editorial was corrected twice when readers complained that it appeared to blame a political action committee belonging to Palin for “political incitement” after it distributed a map depicting Democratic lawmakers beneath crosshairs before the 2011 shooting of Democratic Rep. Gabby Giffords in Arizona.

The editorial originally was published online late in the evening. The newspaper issued corrections online the next morning and in print editions the day after to remove those references and note the map showed electoral districts, not people, in crosshairs.

The judge, known for philosophical asides, wrote: “Nowhere is political journalism so free, so robust, or perhaps so rowdy as in the United States. In the exercise of that freedom, mistakes will be made, some of which will be hurtful to others.”