A federal judge dismissed a lawsuit Thursday afternoon that claimed Suffolk County District Attorney Thomas Spota and a former prosecutor violated a Manorville horse rescuer’s civil rights by searching her farm and prosecuting her.

The suit, brought by New York Horse Rescue leader Mona Kanciper, sought $5 million in damages from Spota and former Assistant District Attorney Leonard Lato, who led the March 2010 search and launched a case that charged her with abusing three dogs.

Kanciper, 53, was acquitted of the animal cruelty charges in 2011. A misdemeanor conviction — endangering the welfare of a child — was later reversed by a state appellate court.

Kanciper sued both the Suffolk Society for the Prevention of Cruelty to Animals and the prosecutors. She settled her suit with the SPCA in 2014. Terms of the settlement were sealed.

U.S. District Court Judge Sandra Feuerstein’s decision came days before a trial in the case was to begin. Witnesses likely would have included Spota, Lato and top officials in the district attorney’s office.

“The dismissal of this case in its entirety reaffirms my contention that the district attorney’s office did absolutely nothing improper in the prosecution of the plaintiff,” Spota said in a statement.

advertisement | advertise on newsday

“It is the right decision,” said Lato’s attorney, Joseph Conway of Mineola. There was no violation of Kanciper’s constitutional rights, he said.

Kanciper’s attorney, Alan Sash of Manhattan, said he was “obviously disappointed” that a jury and the public would not hear how the SPCA and the district attorney’s office went after Kanciper based on flimsy evidence already rejected by other Suffolk prosecutors.

“This is a story that should have been told,” Sash said.

The indictment accused of Kanciper of animal cruelty for improperly euthanizing three dogs. The child endangerment charge claimed a 10-year-old girl was traumatized by witnessing one of the euthanizations, but the appellate court noted the girl had seen the dog get diabetes shots before and was unaware of what was happening.

The suit accused Lato, then the chief of Spota’s Insurance Crime Bureau, of violating Kanciper’s rights by taking allegations that other Suffolk prosecutors in a different bureau had rejected as insufficient and misstated facts to get search warrants for her property. The suit said Spota shared in the blame by allowing Lato to freelance on “special projects” outside his duties and failing to stop an improper prosecution.

In depositions, Lato said he took on the case because the bureau that had rejected the case was “lazy and stupid.”

In her 60-page ruling, Feuerstein wrote that no policies in the Suffolk district attorney’s office prevented Lato from taking a case that others had rejected. She also wrote there was no evidence that he had obtained the search warrants or the indictment improperly, leaving Lato’s actions otherwise covered by prosecutorial immunity.

Spota had no role in the investigation of Kanciper and didn’t even know about it until after the search warrants were executed, Feuerstein wrote. He could be liable only if he knew of illegal activity and didn’t correct it, she wrote. But in this case, Feuerstein said there was no proof of illegal activity for Spota to know about.