A Nassau County Court jury on Monday rejected Nassau prosecutors’ claims that a Uniondale High School teacher sexually assaulted a young girl, acquitting the 40-year-old AP World History teacher of all 18 counts of rape, sexual abuse and endangering the welfare of a child.

Lionel Harvey — who spent nine months in jail — was acquitted after a trial that began Oct. 24 and ended Monday after 30 to 40 minutes of deliberation, his attorney said, adding the swift verdict showed the jury’s resolve.

“This guy was outright innocent,” said Michael Alber, Harvey’s Commack-based attorney. “I really believed it from Day One. They delivered a very fast verdict and it speaks volumes. This is a guy who clearly, in my eyes, had his life wrecked.”

Harvey was arrested in late April 2015 and charged with serious felonies including first-degree rape involving a victim under age 13, rape, attempted rape and endangering the welfare of a child, court records show.

The child was not a student in the Uniondale schools.

Harvey was placed on paid leave from his duties as a teacher for the duration of the case, but still spent about nine months incarcerated in the Nassau jail, his attorney said.

advertisement | advertise on newsday

Harvey had posted the bail after he was arraigned on the charges, but was remanded to jail after court systems in Virginia and Florida registered charges as well because the child said he assaulted her in those states.

Uniondale school district officials barred Harvey from its property “for the duration of the district attorney’s investigation and related proceedings,” the district said in a statement at the time. “The safety of our students is our first priority, and we will take all appropriate action to ensure that our school district remains a safe and protective environment for our children.”

Uniondale School District officials could not be reached for comment Monday night.

Brendan Brosh, a spokesman for Nassau District Attorney Madeline Singas, said: “We thank the jury for their service.”

But Alber said Harvey’s reputation has been tarred by false allegations that were also filed in Florida and Virginia, two jurisdictions he said he hopes will drop charges based on the outcome of the New York case.

“He’s a guy with a master’s degree and was one of the most respected teachers,” Alber said, adding that Harvey, despite the acquittal, is “facing the stigma for the rest of his life for being accused of molesting a child.”