An armed pastor shut down a burglar in his tracks Thursday morning by holding the suspect who'd broken into his church at gunpoint until police could get there.

Lead Pastor Brant Adams of Seminole Heights Baptist Church responded to an alarm going off at the church just past 1 a.m. Adams, who lives nearby, arrived along with a deacon and found the suspect, Miguel Otero-Rivera, rifling through several church offices after breaking in a window, according to FOX 13.

"I didn't know what he had in his hand, so I pulled the gun through the window," Adams said. "I took the gun, pointed it at him, and told him to get down. I yelled at him and said, 'Hey, get down!' He put his hands up, went to the ground."

CALIFORNIA DESERT TOWN AIMS TO BE 'SANCTUARY CITY' FOR GUN OWNERS

Police arrived a few minutes later and took Otero-Rivera, who had left a trail of blood through the church after breaking the window, into custody, FOX 13 reported. He was charged with burglary, grand theft, and drug possession.

Chruch leaders think he was trying to steal cash.

Adams said there's no need for people who are struggling to steal from anyone.

"There's so many things that we try to do to help people," he said. "If he would've just come to the back door and knocked and asked for something, said, 'I need some food.' We would've given him some food."

CLICK HERE TO GET THE FOX NEWS APP

Nobody was hurt in the burglary, although there is some significant damage to doors and windows in the church, according to FOX 13.

Fox News' Tyler Olson contributed to this report.