An Iowa man has been arrested in the murder of a pastor -- and longtime chaplain to first responders -- who was found beaten to death and robbed outside his church, investigators said.

Joshua Pendleton, 36, was charged with first-degree murder and robbery in the death of 64-year-old Rev. Allen Henderson.

The senior pastor was found unresponsive outside the St. Paul Lutheran Church on Wednesday evening with injuries consistent with assault, Fort Dodge police said in a statement. Doctors later pronounced him dead at a hospital.

IOWA FARMER CONVICTED OF MURDERING WIFE WITH CORN RAKE AFTER LEARNING OF SECRET AFFAIR

“[Henderson] was a beloved member of our family and we are working with heavy hearts this evening as we move forward from this tragic incident,” the department said. “He will forever be remembered for his dedication and service for all of those he touched within this community and beyond.”

Joshua Pendleton, right, was arrested in the deadly beating and robbery of Rev. Allen Henderson.

Joshua Pendleton, right, was arrested in the deadly beating and robbery of Rev. Allen Henderson. (Fort Dodge Police Department/Webster County Jail via AP)

As police investigated, officers recognized Pendleton on surveillance video trying to enter the building, the Des Moines Register reported, citing a police lieutenant’s statement in a court filing.

IOWA BOY, 14, IS ACCUSED OF POSTING 'SCHOOL SHOOTER' AS ON JOB WEBSITE

Pendleton later told police he had fought with a man outside the church and turned over a cellphone he snatched from the victim, the lieutenant said.

Pendleton was scheduled to appear in court Thursday, but it was delayed until Friday so he could be appointed a different public defender, the paper reported. He appeared to have a violent outburst in the Webster County Jail before his scheduled video appearance, KCCI-TV reported.

CLICK TO VISIT THE ALL-NEW FOXBUSINESS.COM

He previously was convicted of an assortment of other crimes, including disorderly conduct and assaulting a jailer.

Henderson had served at the church since 1999. He was an active member of the group Serving Our Servants, which supports public servants. Among other activities, it has provided water and food to first responders and raised money to buy Fort Dodge police new dress caps for formal occasions.

The Associated Press contributed to this report.