WISCASSET, Maine — A Boothbay man who pleaded guilty to five charges of possession of sexually explicit materials — child pornography — in June was sentenced Sept. 25 to five years in prison with all but two years suspended.

Joseph Pinkham, 28, was indicted by grand jury on 10 charges of possession of sexually explicit material, seven felonies and three misdemeanors.

Pinkham pleaded guilty to three of the felony charges and two misdemeanors as part of a plea deal in June. Justice Daniel Billings accepted a written plea agreement, which would sentence Pinkham to five years in prison will all but a maximum of two years suspended followed by two years of probation.

Sentencing was deferred to allow for the transfer of a bail violation case against Pinkham — to which he pleaded guilty Sept. 25 — to be transferred from Rockland to Lincoln County.

In handing down Pinkham’s sentence, Billings said the sequence of events in the case was what really stood out.

According to Assistant District Attorney Jonathan Liberman, Pinkham had computers seized by law enforcement on three separate occasions related to the case — in February 2012, March 2013, and October 2013.

“Law enforcement showed up at Mr. Pinkham’s house, they questioned him about child pornography, he admitted having child pornography, they took his computers,” Billings said. “Anybody with any ability to change their behavior, or any interest in changing their behavior, that should be the ultimate wake-up call, and it wasn’t a wake-up call for Mr. Pinkham. He continued to engage in that behavior.”

Liberman said a full forensic analysis of one of the computers revealed roughly 300 suggestive images, 30 pornographic images, and a dozen videos of children 12 and younger. One video cited as particularly troubling depicted an adult sexually assaulting a young girl.

Pinkham’s attorney, David Paris, argued the specific content of the materials should not be considered in the sentencing.

“I don’t think he should be sentenced [on], or the court should be necessarily concerned with, the exact content of what was going on. The fact that it meets the requisites for the statute is enough,” Paris said. “There’s no way for someone to know the egregiousness in advance of opening something.”

Paris also argued Pinkham was not a distributor or purveyor of the materials, but Liberman pointed out Pinkham used a peer-to-peer file-sharing program to download the files, which would make his computer a source for other users once his downloads completed.

Billings took note of the manner in which Pinkham came to the attention of law enforcement in the case of all three seizures — Internet conversations Pinkham had with women in which he said he had sexual relations with underage girls.

The investigation found Pinkham’s statements about the sexual relations were not true, however, Liberman said.

“One of the reasons our society takes these crimes so seriously is there is statistical evidence to show that people who look at these materials are more likely to engage in actual abuse of children,” Billings said. “In this case that didn’t happen, which is fortunate, but the behavior that Mr. Pinkham did engage in, on multiple occasions, bragging about doing so, suggests that he may be someone who wants to engage in that behavior and raises the suggestion a longer period of incarceration may be necessary.”

Arguing for a lesser sentence, Paris said Pinkham has been “an appreciated member of the community” and pointed to 11 letters of personal reference submitted for Pinkham.

Paris also asked for a July 10 assault on Pinkham while in jail to be considered.

“While incarcerated, Pinkham was subject to a rather vicious and unprovoked attack” and had to go to a hospital with injuries to his mouth and jaw, Paris said.

Pinkham’s attacker, Jeremy Holt, 24, of Clinton, pleaded guilty Sept. 25 to aggravated assault, a Class B felony, and violation of condition of release, a Class E misdemeanor.

Pinkham lost portions of two teeth that later had to be surgically removed, among other injuries, Wright said.

“I’m not sure how that factors in for the purposes of sentence, but I’m going to suggest that incident, your honor, puts him at continued risk …,” Paris said.

Addressing the court, Pinkham apologized for “inconveniencing friends and family” and “abusing the privilege of using the Internet,” something he said will never happen again.

“I’m looking forward to getting out, resuming with counseling; I really feel I need it, and I want to get better,” Pinkham said.

Billings ultimately sentenced Pinkham to the maximum under the plea agreement: On one of the charges, he received five years incarceration with all but two years suspended, followed by two years probation.

His probation conditions include sex offender treatment; he is not to possess pornography, computers, or Internet-capable devices; no access to the Internet; and no contact with children under the age of 16.

Pinkham was also given two concurrent two-year sentences and two one-year sentences for the other possession charges, and a concurrent six-month sentence for the bail violation.

Pinkham will be required to register as a sex offender, according to court personnel.