A Pennsylvania state senator from Lebanon County resigned Wednesday, a day after he was arrested and charged with possession of child pornography and other crimes.

Senate leaders said they had received Sen. Mike Folmer’s letter of resignation Wednesday morning.

“We are sickened and disturbed by the charges brought against Mike Folmer,” Senate President Pro Tempore Joe Scarnati and Senate Majority Leader Jake Corman said in a statement. "We have reviewed the criminal complaint and spoke with Mike Folmer early this morning to insist on his resignation from the Senate.”

Folmer, known as a conservative Republican, was charged Tuesday by the state Attorney General’s Office with possession of child pornography and criminal use of a communication facility, both felonies.

The office of Attorney General Josh Shapiro said Tuesday the investigation into Folmer began when the National Center for Missing and Exploited Children was alerted in February by the social-media website Tumblr that an image of suspected child pornography had been uploaded to its site in December 2017.

The tip was passed along to authorities in Pennsylvania, who traced the image of a “very young female child” to an IP address and email address associated with Folmer’s Tumblr account, according to court papers.

Law enforcement officers executed a search warrant at Folmer’s house Tuesday and discovered two child pornography images on the senator’s phone, court records show.

Folmer, 63, told authorities Tuesday that he had been dealing with personal problems and received child pornography through his blog on Tumblr.

He was arraigned Tuesday night and posted $25,000 bail, according to court records.

Neither Folmer nor his lawyer returned calls seeking comment.

Jennifer Storm, the state’s victim advocate, said Wednesday that she was “deeply alarmed” by Folmer’s statement to agents: “As though viewing crimes against children is now just an acceptable coping mechanism to having a bad day and going through a rough period?”

Folmer, who is married and has two children and seven grandchildren, was first elected in 2006 and reelected to a fourth term last November. He was one of two senators who led the charge in Pennsylvania to legalize medical marijuana, a bill that initially faced steep opposition in the legislature. His efforts, along with those of medical cannabis advocates, have been credited with the bill becoming law in 2016.

Gov. Tom Wolf, a Democrat, had called on Folmer to resign earlier Wednesday.

“We elect leaders to serve as a voice for those who do not have the ability to advocate for their own needs, demanding that they will protect our children, families, and communities,” Wolf said. “The charges against Senator Folmer are disgusting and beyond comprehension, and show he has taken advantage of the trust and privilege afforded by the people of Pennsylvania.”

Under the state constitution, Lt. Gov. John Fetterman, a Democrat, is tasked with setting a special election to fill the vacancy caused by Folmer’s resignation. His district covers Lebanon County and parts of York and Dauphin Counties.