A pistol-packing pastor shot and killed a man who was allegedly trying to attack him with a brick on Sunday in the vestibule of a Detroit church, police said.

Cops say Deante Smith, 25, attacked the unidentified pastor and threatened several parishioners of The City of God church with a brick and hammer, FOX2 reported. Police said the attack was not random; the pastor and Smith knew each other and the two have had problems in the past.

Assistant Detroit Police Chief Steve Dolunt said a previous police report had been filed against Smith, The Detroit Free Press reported.

"The pastor pulled out his Glock and fired several shots"

- Steve Dolunt, asst. Detroit police chief

“The pastor had had issues with the man before,” Dolunt told the Detroit News. “He had been threatening to do him bodily harm. He walked into the service and went after the pastor with a brick. The pastor pulled out his Glock and fired several shots. I think he hit him four or five times, and the man died.”

Sunday’s incident occurred just before 2 p.m. as church was ending, Detroit Police Sgt. Cassandra Lewis told WWJ.

“We’re not sure at this point whether the man had mental problems or what,” Dolunt said. “It’s still under investigation.”

No one else was hurt during the episode, according to FOX2. The pastor has been questioned by police.

City of God is a non-denominational church, according to its Facebook page.

“The reality is, things can happen anywhere now,” City Councilman Andre Spivey told the Detroit News. “[Church] is a haven of rest and safety…when you cannot be safe in God’s place of worship, where can you be safe?”