A married small-town Pennsylvania police chief was arrested Friday and accused of trying to solicit sex online from an undercover agent posing as a 14-year-old girl.

The state attorney general's office said Leechburg Police Chief Michael Diebold, 40, was arrested at a spot in Westmoreland County where he thought he had made plans to meet the girl.

Diebold is charged with unlawful contact with a minor and criminal attempt to commit involuntary deviate sexual intercourse, both felonies.

"This case is particularly heinous because the perpetrator is a public official, sworn to serve and protect the community," Pennsylvania Attorney General Josh Shapiro said in a statement. "We have a zero tolerance policy for the sexual abuse of children and my office will prosecute any offender to the fullest extent of the law, no matter who they are."

WTAE, citing court documents, reported that Diebold sent explicit messages and photos to the agent using the Kik messaging app under the username "Kutecop4you." The agent said he began communicating with Diebold after responding to an online ad in which the chief described himself as a "dom male ... looking for a female sub for ongoing play sessions.

"I do not have a set type of woman so any age, race or status may email me," the alleged posting said.

According to an affidavit, Diebold was interviewed without an attorney present and admitted to sending the messages.

"Diebold admitted that he knew that sexual contact with a 14 year [old] child was wrong and illegal and that his life was totally over," the agent wrote in the affidavit, according to the Pittsburgh Post-Gazette.

Part of Diebold's left arm was amputated last year in a fireworks accident during a fire company carnival. The chief got married fewer than three weeks later. The Post-Gazette reported that Diebold's wife recently gave birth to a boy.

Diebold was scheduled to return to work last month, but city officials placed him on leave Dec. 11. Leechburg Mayor Wayne Dobos told the Post-Gazette Friday that he was not aware that Diebold was under investigation when he was placed on leave.

"This is all a surprise to me," Dobos said. "I'm just as shocked as everyone else."

The Associated Press contributed to this report.