A divided panel of the U.S. Court of Appeals for the Second Circuit ruled Wednesday that convicted former Suffolk County District Attorney Tom Spota and an ex-lieutenant could not be sued for their decision to pursue criminal charges against 10 nurses who quit their jobs at a Long Island nursing home in 2006.

A majority of the three-judge panel held that Spota and Leonard Lato, the former head of the DA office’s insurance crime bureau, were entitled to absolute immunity for bringing the criminal case, which was later shut down by a state appellate court.