TAMPA — The security alarm at Seminole Heights Baptist Church started ringing around 12:40 a.m. Thursday.

Alerted at his home nearby, Pastor Brant Adams, 40, rolled out of bed, grabbed his handgun and jumped into his pickup truck.

Minutes later, Adams and a deacon, Jack Young, crept into the church at 801 E Hillsborough Ave. The lights were on inside.

Adams spotted a man he didn't know going through a desk in one of the church offices.

The man noticed him and started to move forward, so Adams drew his gun and screamed at him to get on the ground. The man quickly complied. The pastor approached and stood a few feet away.

"I said, 'Dude, what are you doing?'" Adams told the Tampa Bay Times.

Young called Tampa police and Adams held the suspect at gunpoint until officers arrived just after 1 a.m.

"He wasn't looking for a fight, which I thank the Lord for," Adams said.

Police later identified the man as Miguel Otero-Rivera, 49, of Tampa. He was arrested and charged with burglary of an unoccupied structure, grand theft, possession of burglary tools, possession of a controlled substance and possession of drug paraphernalia. He was booked at the Orient Road Jail and was being held on $8,500 bail Thursday.

Otero-Rivera broke into the church by smashing a window with a brick, Adams said, then he kicked down several doors inside. He cut his back climbing in so blood was spattered through the building. He received medical treatment.

Repairs to the damage could cost the church thousands of dollars, Adams said.

He believes Otero-Rivera was looking for cash. Police said he tried to snatch a church laptop.

When Adams spotted him, Otero-Rivera was rooting through the office of Mission Tampa — a local food pantry run out the Seminole Heights Baptist Church office, Adams said.

As he was led out of the building, Otero-Rivera told Young, "I'm sorry, I'm sorry," Adams said.

"I'm just glad everyone's all right," said Adams, who has worked at the church for seven years. "Hope the gentleman gets the help that he needs."

The pastor has been around guns his whole life, he said. He bought the handgun he used Thursday about two years ago, for protection. He's a regular at the shooting range.

Still, Thursday's break-in shook him up, he said. Guns can change lives in an instant.

"You never want to pull a gun on someone," Adams said. "I never thought I'd pull a gun on someone."

Contact Sam Ogozalek at sogozalek@tampabay.com or (813) 226-3430. Follow @SamOgozalek.