A man was disoriented and speaking "incoherent phrases" when he shot three people to death at a Baptist church before being seriously wounded by Brazilian military police, authorities said Wednesday. He allegedly arrived at the church after having killing his ex-girlfriend with a knife.

Rudson Aragao Guimaraes, 39, was in stable condition but had not regained consciousness following Tuesday's attack at the Shalom church in Paracatu, said Flavio Santiago, a spokesman for military police in Minas Gerais state.

Police reported that survivors quoted Guimaraes as saying "he'd come back from Hell to complete a mission" before he opened fire with a pistol.

In this photo released by Agora News, a man stands near blood stains at the entrance of a Baptist church where a man killed three people after he knifed his girlfriend in her home, in Paracatu, Minas Gerais state, Brazil, Tuesday, May 21, 2019. The gunman was then shot and wounded by military police at the church. Authorities did not provide a motive for the attack, but said the wounded man had been expelled by the church for "problems of behavior." (Marco Aurelio CostaAgora News via AP)

In this photo released by Agora News, a man stands near blood stains at the entrance of a Baptist church where a man killed three people after he knifed his girlfriend in her home, in Paracatu, Minas Gerais state, Brazil, Tuesday, May 21, 2019. The gunman was then shot and wounded by military police at the church. Authorities did not provide a motive for the attack, but said the wounded man had been expelled by the church for "problems of behavior." (Marco Aurelio CostaAgora News via AP)

Military police commander Luiz Magalhaes told The Associated Press that Guimaraes was "disoriented" and speaking "incoherent phrases."

The shooter's apparent original target, the church's pastor, managed to escape out the back of the church.

Authorities said Guimaraes first fatally shot a man and a woman, and when military police arrived he grabbed another woman and killed her with a gunshot to her head. Police then shot Guimaraes in the chest.

This photo released by Agora News shows a street view near the Baptist church, in background on right, where a man killed three people after he knifed his girlfriend in her home, in Paracatu, Minas Gerais state, Brazil, Tuesday, May 21, 2019. The gunman was then shot and wounded by military police at the church. Authorities did not provide a motive for the attack, but said the wounded man had been expelled by the church for "problems of behavior." (Marco Aurelio CostaAgora News via AP)

This photo released by Agora News shows a street view near the Baptist church, in background on right, where a man killed three people after he knifed his girlfriend in her home, in Paracatu, Minas Gerais state, Brazil, Tuesday, May 21, 2019. The gunman was then shot and wounded by military police at the church. Authorities did not provide a motive for the attack, but said the wounded man had been expelled by the church for "problems of behavior." (Marco Aurelio CostaAgora News via AP)

Before going to the church, the suspect stabbed to death his former girlfriend, Heloísa Vieira Andrade, 59, on the outskirts of Paracatu, a city of 80,000 people.

Officials said a closed meeting of about 20 churchgoers was being held at the time of the shooting. Authorities did not provide a motive for the attack, but said the wounded man had been expelled by the church for "behavior problems."

"We do not know if the attacker had a license to carry guns. It will be investigated," Santiago said.