TRENTON - A former Democratic state assemblyman who championed legislation to fight child pornography was sentenced Thursday to a five-year term for viewing nude images of underage girls.

The state Corrections Department will decide within 10 days whether Neil Cohen, 59, will serve his term in prison or a mental hospital. He could be eligible for release and placed under intense supervision in several months.

Cohen represented Union County for 17 years. He resigned from the legislature after his July 2008 arrest.

Appearing pale and unsteady, Cohen did not speak during sentencing. His lawyer, Mark Tuohey, told the judge Cohen has been suicidal and has chronic depression, among other mental-health issues. He has been hospitalized for months, Tuohey said.

Judge Gerald Council imposed the sentence in Mercer County Superior Court.

"This is a sad day," the judge said. "But for this incident, he had an unblemished record."

Cohen pleaded guilty in April to endangering the welfare of a child (distribution of child pornography). The five-year term was negotiated as part of the plea.

The former lawmaker admitted viewing images of young girls on computers in his legislative and law offices.

Anthony Picione, the deputy attorney general who prosecuted the case, said 34 images of girls in stages of undress were found on the computers. Authorities matched some of the images to photos on the list of Missing and Exploited Children, he said.

The Attorney General's Office said Cohen admitted printing copies of some images and placing them in the desk of a female receptionist in the legislative office.

Cohen must register as a sex offender under Megan's Law and will be barred from holding public office and using social-networking websites.

He is a lawyer and will likely be disbarred.