An inmate diagnosed with terminal cancer only two weeks after his conviction was overturned on a habeas petition died Thursday night, according to his attorney.

Ronald Kuby said his client, Thomas Green, had only a single day with his family before checking himself into Stony Brook Hospital.

Green, who had always claimed he was falsely accused of molesting three young girls in Suffolk County, served more than five years of a 35-year sentence before Eastern District Judge Arthur Spatt (See Profile) on Aug. 12 granted his writ of habeas corpus (NYLJ, Aug. 13).

Spatt found that Green’s trial counsel had neglected to pursue evidence that could have undermined the prosecution’s case. Kuby was more critical of the prosecution for presenting what he described as false evidence than he was of the trial attorney, Paul Gianelli of Reynolds, Caronia, Gianelli & LaPinta in Hauppauge, for failing to rebut the prosecution’s claims.

On Sept. 2, while awaiting word from the Suffolk County District Attorney’s office on whether it would pursue a retrial, Green was diagnosed with rampant, terminal cancer and given only weeks to live, Kuby said. Records indicate that Green had cancer in his lung, prostate, colon and blood.

The district attorney’s office, which was appealing Spatt’s order, at first opposed Kuby’s motion for bail, but later dropped its objections. Spatt released Green on $100,000 bond, requiring him to wear a monitoring bracelet.

Green was discharged from the Peconic Bay Medical Center’s prison ward on Sept. 9 to a regular patient room, where he stayed until Sept. 13. He had about a day with his family before checking into Stony Brook, where he spent his final two weeks, Kuby said.

In an interview, Kuby said he presumes the conviction will be vacated, but is uncertain if there is any other relief that could be sought by the estate.

‘The only remedy for him at this point is religious or supernatural,” Kuby said. “He is innocent after death. The reality is it is very difficult to prove your innocence by clear and convincing evidence when you are dead.”

Green v. Lee, 12-cv-5796, the case before Spatt, stemmed from allegations that the defendant had molested his granddaughter and four of her friends between 1998 and 2003. Green was accused in 2006 when one of the alleged victims came forward, but insisted he did not even know the allegedly abused girls at the time they said they were molested.

At trial, the prosecution attempted to establish that an alleged victim and the defendant’s granddaughter had been friends, and that Green would have known her, by introducing photographs of the girls together that were supposedly taken in 1998 or 1999.

One of the complainants also said Green had given her a particular toy during that period and that she had opted not to come forward to report the abuse because she watched “Law & Order: SVU” and was aware, as a seven-year-old, the difficulties she would likely face as a witness.

However, a post-trial investigation established that the film used in the photographs had not been manufactured until several years after the alleged incidents, that the sweatshirt worn by a complainant in the picture depicted the logo of a company that did not exist in the late 1990s, that the toy Green allegedly gave the girl had not yet been produced and that “Law & Order: SVU” was not yet airing.

Gianelli, in an affidavit, admitted there was “no strategic reason” for his failure to more thoroughly investigate and that if he had, the evidence “would have proved indispensable in presenting [the] defense and discrediting” the prosecution witnesses.

Regardless, Suffolk County Judge Barbara Kahn denied a motion to set aside the verdict, the Appellate Division, Second Department, affirmed and the Court of Appeals denied leave.

In his habeas petition, Green argued both prosecutorial misconduct and ineffective assistance, contending that the district attorney knew or should have known that its corroborating timeline evidence was false and that Gianelli should have discovered the problem’s with the people’s case.

Spatt ruled only on the ineffective assistance claim.

The judge said that given Green’s consistent assertion that he could not have committed the charged offenses because he had not yet met the accusers when the crimes allegedly occurred, Gianelli “failed to make a reasonable investigation of the relevant time frame.” He gave Spota 90 days to grant Green a new trial.

In a statement, Kuby said Green was innocent and should have spent his final years with his family and friends instead of locked away in a state prison.

“Because of the misconduct of the Suffolk County DA’s office, he spent those years in prison as his cancer, untreated and undetected, metastasized,” Kuby said. “In their self-righteous zeal, the prosecutors killed an innocent man and remain both unapologetic and unaccountable.”

Robert Clifford, spokesman for the district attorney, said the office has “significant differences with Mr. Kuby’s interpretation of the evidence, the law and the events as he describes them.”

Gianelli was not immediately available for comment.