Dr. Rachel Levine has not given a public comment regarding Rep. Pyle's post.

HARRISBURG, Pa. (AP) — A Pennsylvania legislator shared on Facebook an image mocking the appearance of the state’s recently departed health secretary, Dr. Rachel Levine, a transgender woman who has been nominated to serve in the Biden administration, and then offered a general apology Saturday.

State Rep. Jeff Pyle, a Republican from Armstrong and Indiana counties in western Pennsylvania, said on Facebook that he “had no idea” the post mocking Levine “would be … received as poorly as it was” but that “tens of thousands of heated emails assured me it was.”

READ MORE: Pittsburgh-Area Outpatient Monoclonal Antibody Infusion Clinic To Expand Appointments Due To Demand

“I owe an apology and I offer it humbly,” Pyle said, not specifically apologizing to Levine or other transgender people, but later repeating an apology “to all affected.”

Levine has not commented. The state health department did not immediately respond to an email seeking a reaction to Pyle’s initial post or his apology.

Comments on his Facebook page had called for him to resign.

President Joe Biden tapped Levine a day before his inauguration to be his assistant secretary of health, leaving her poised to become the first openly transgender federal official to be confirmed by the U.S. Senate.

READ MORE: FBI Investigates Slew Of Threats At Pittsburgh-Area School Districts

Related: Pennsylvania Health Secretary Dr. Rachel Levine Tapped To Become First Openly Transgender Federal Official

Pyle, who was first elected in 2004, cited a conversation with the Democratic leader in the state House “who explained the error of my post.” He stressed that he did not come up with the meme but merely shared it, though he said he should not have done so.

“From this situation, I have learned to not poke fun at people different than me and to hold my tongue. Be a bigger man,” he wrote.

Pyle wrote he would leave Facebook “soon” but was not resigning and would focus on a Butler Community College project and the economic revitalization of Pennsylvania amid the COVID-19 pandemic.

MORE NEWS: 'Georgia's Defense Is Just So Good': CBS Sports’ Houston Nutt Previews SEC And Conference USA Championships

(Copyright 2021 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.)