A US Border Patrol agent in Arizona has been charged with sexually abusing several children over a period of years after a lengthy investigation that ended with him barricading himself inside a church and holding police at bay for four hours.

Dana Thornhill, 49, was arrested shortly before 8 p.m. on Thursday, AZCentral reported, when negotiators convinced him to surrender.

Sierra Vista Police Lt. Sean Brownson said Thornhill had been under surveillance for some time.

It’s True Justice Month on Fox Nation, and “Crimes Stories with Nancy Grace” is available now! Sign up today and get your first month for only 99 cents!

“It became pretty apparent that he was aware that law enforcement was watching him, and he was concerned that he was going to get arrested,” he said.

Police were about to take that step to arrest him, Brownson said, because investigators felt he was a threat to the community.

“We felt strongly at this time that he should not be walking the streets based on what types of crimes he had committed, the sexual assaults on children, and then the fact that they were continuous over multiple years,” he said.

On Thursday, Thornhill fled Sierra Vista to nearby Huachuca City, where he holed up in church he had access to and that he’d had at time an affiliation. Armed with a .40-caliber semiautomatic handgun, he built barricades in several portions of the church. After his surrender, police found his weapon disassembled and his Border Patrol credentials.

Brownson also said that police executed a search warrant at Thornhill’s home and found additional evidence.

“I can’t comment on what that is right now, but there’s corroborating evidence that he was involved in this type of activity,” Brownson said.

The Border Patrol refused comment on how long Thornhill had been with the service or where he was stationed. In a statement, the agency said it takes “all allegations of employee misconduct seriously,” according to KGUN.

“CBP does not tolerate corruption or abuse within our ranks, and we cooperate fully with all criminal or administrative investigations of alleged misconduct by any of our personnel, whether it occurs on or off duty,” it said.

Thornhill is being held without bond at the Cochise County jail, charged with two counts of sexual conduct with a minor and two counts of sexual assault. Under Arizona law, he faces up to life in prison for each.

All the incidents contained the complaint against him occurred within Sierra Vista, a moderate-sized town just north of the border with Mexico. The Department of Homeland Security assisted with the investigation, Brownson said, and could refer federal charges to the Department of Justice.

For the latest true crime and justice news, subscribe to the ‘Crime Stories with Nancy Grace’ podcast. Listen to a related episode:

Join Nancy Grace for her new online video series designed to help you protect what you love most – your children.

[Featured image: Dana Thornhill/Cochise County Sheriff’s Office]