LEBANON, Pa. — A former Pennsylvania lawmaker was sentenced to jail Tuesday for possession of child pornography in a case that prompted him to resign from the state Senate and plead guilty.

Michael Folmer, a Republican who represented a district based in Lebanon County, got one to two years in the county jail and must register as a sex offender for 15 years.

“I’m not mad at anyone but myself,” Folmer, 64, told the judge, the Lebanon Daily News reported. "I understand that there are consequences for my actions.”

He pleaded guilty in February to three counts of possessing child pornography and one count of criminal use of a communications facility for having items on his cell phone. A prosecutor described them as images of nude children that depicted indecent contact, and said Folmer had cooperated when questioned.

He was not classified as a violent sexual offender under state law.

Attorney General Josh Shapiro, whose office handled the prosecution, said people who make laws are not above the law.

"This was a public official whose constituents trusted to do what’s right, but he failed. He engaged in the sexual exploitation of children,” Shapiro said in a statement issued after the hearing.

Investigators said the search of his cell phone was prompted by a tip from Tumblr, a blogging and social media platform.

Tumblr sent a complaint in early 2019 to the National Center for Missing and Exploited Children, saying a user had uploaded at least one image that contained suspected child pornography in December 2017, according to court papers filed by the Attorney General’s Office in September.

Investigators traced the Tumblr account to Folmer’s email address and home address, they said. Folmer’s lawyer, Brian Perry, said Tuesday that Folmer has been undergoing counseling and treatment for sexual addiction. Folmer served in the Senate from 2007 to 2019.