A former investigator with the New York State Police stationed on Long Island was sentenced to 9 months of home detention Friday in a child pornography case.

SeanMichael Pagano of Mount Sinai could have been sentenced to 46 months to 57 months in prison under federal sentencing guidelines after he pleaded guilty to one count of accessing child pornography.

But in sentencing Pagano, U.S. District Judge Arthur Spatt said he was balancing the seriousness of the crime with his otherwise “outstanding” career — as a Marine and state trooper, and in community service.

While involvement in child pornography is “a terrible crime,” Spatt said he found Pagano to be “no danger to society or anyone” and “truly remorseful.”

Pagano was a volunteer assistant lacrosse coach in the Rocky Point School District from December 2013 to March 2014 and had been hired as a paid assistant coach shortly before his arrest in April 2014.

Previously, Pagano had been head men’s lacrosse coach at the Bethpage campus of Briarcliffe College from 2009 to 2013.

advertisement | advertise on newsday

Spatt ordered Pagano to register as a sex offender, continue the mental health treatment he has been undergoing at his expense and serve 5 years’ supervised release.

“I take full responsibility for my actions,” Pagano said, tearing up as he spoke in federal court in Central Islip. “I am sorry. . . . Helping people was my main goal in life.”

After the sentencing, Pagano’s attorney, Joseph Conway of Mineola, who argued for leniency, said: “We are extremely pleased with the sentence crafted by the judge.”

Eastern District U.S. Attorney Allen Bode had asked for harsher punishment, noting that Pagano, as a state trooper, had gone along on raids involving child pornography with FBI agents and police on Long Island who normally deal with such cases.

Because of Pagano’s relationship with FBI agents on Long Island, agents from New York City had to work on the case, Bode said.

Pagano had to be aware of the dangers and harm of child pornography, Bode said, adding that as a law enforcement officer, he had a mandatory obligation to report the crime.

Pagano, who was stationed in East Farmingdale, was arrested by FBI agents after he was accused of accessing a website in Alaska and downloading child pornography.

The arrests came after agents raided a house in Anchorage in March 2013 that served as a base for the distribution of child pornography and took over the site, collecting information on who was involved with it.

Pagano, who held a position equivalent to detective, resigned from the State Police.

SeanMichael Pagano, arrives at federal court in Central Islip on Friday, Feb. 12, 2016. He's expected to be sentenced for child porn charges. Photo Credit: James Carbone

At the time of his arrest, Pagano falsely claimed he was investigating child pornography. His duties actually involved narcotics cases.