Gunman kills 4, then himself, after mass at Brazil cathedral

A man entered a Catholic cathedral in the Brazilian city of Campinas and killed four people attending midday mass before turning a gun on himself at the altar, police say.

Attacker fired on congregants as they prayed before gunfight with police

Police take photos of a body at the scene of a shooting at the cathedral in Campinas, Brazil, on Tuesday. (Ricardo Lima/Reuters)

A gunman opened fire inside the Catholic cathedral in the Brazilian city of Campinas on Tuesday and fatally shot four people praying in the pews before killing himself after police wounded him, authorities said.

Police identified the shooter as Euler Fernando Gandolfo, 49, a systems analyst from the nearby city of Valinhos. They said he had no criminal record.​

Gandolfo entered the cathedral and sat down among mainly elderly worshippers who remained to pray after midday mass.

"I suddenly saw a man stand up, take position in front of a couple and shoot them point blank. I ran out fast and he continued firing, many shots," said Pedro Rodrigues, a 66-year-old retiree.

"It was frightful," said another witness, Alexandre Moraes, on GloboNews channel. "He shot randomly at people. They were all praying."​

Hours after paramedics were seen taking bodies and injured out of the church, authorities identified the shooter as 49-year-old Euler Fernando Gandolfo of Valinhos, a nearby city in the densely populated state of Sao Paulo. (Ricardo Lima/Reuters)

Campinas police chief Jose Henrique Ventura said security cameras showed Gandolfo walk into the cathedral and sit down. A little later he started shooting at people.

Police in the plaza outside rushed in when they heard the shots, Ventura told a news conference.

The gunman ran to the altar while firing at police and took a bullet in the ribs. He fell to ground and shot himself in the head, Ventura said. Gandolfo had two guns with 28 rounds left when he died.

In total, the suspect fired at least 20 shots, said Hamilton Caviola Filho, a police investigator.

A siren is seen on a police vehicle parked outside the Metropolitan Cathedral, where the shooting in Brazil took place. (Ricardo Lima/Reuters)

Four people were shot dead and four others were wounded, but Ventura said they were out of danger in a hospital in Campinas, an industrial city 100 kilometres northwest of Sao Paulo.

Police have not established a motive.

Brazil had nearly 64,000 murders last year — more than any other country, according to the United Nations. However, random mass shootings are relatively rare, with few American-style shootings in schools or other public areas.

The rise in armed violence helped far-right politician Jair Bolsonaro win October's presidential election, vowing to crack down on corruption, drug gangs and crime in the streets of Brazilian cities.

Bolsonaro, who takes office on Jan. 1, plans to ease gun laws to allow Brazilians to arm themselves against criminals, a policy his critics say will only increase the murder rate. 

With files from The Associated Press