(CNN) A gunman opened fire on a church in the Brazilian city of Campinas on Tuesday, killing four people before turning the gun on himself, CNN affiliate Record TV reported.

Police earlier said the shooter killed five, but have scaled that number down to four.

The victims include three men and a woman, in addition to the gunman, Record TV reported. Police initially said nine people were injured but have revised that number down to four. One person is in critical condition.

The gunman has been identified as 49-year-old Euler Fernando Grandolpho, a resident of the neighboring city of Valinhos, according to state-run news agency Agencia Brasil.

The shooting occurred in the Metropolitan Cathedral, according to a statement from local police to Record TV. The shooter entered the church around 1:25 p.m., according to state-run news agency Agencia Brasil. The motive is unknown.

Grandolpho had no previous criminal record and worked at São Paulo state's District Attorney's office as an assistant up until 2014, Agencia Brasil reported.

So far, the evidence doesn't indicate that Grandolpho knew the victims, Agencia Brasil said, citing Jose Henrique Ventura, a police officer investigating the shooting.

"We're going to begin to identity the victims shortly. We wanted to know who the shooter was first," Ventura told Agencia Brasil.

Surveillance video from inside the church shows Grandolpho entering the church, sitting in one of the pews and shooting people who were sitting behind him, according to Agencia Brasil.

The Archdiocese of Campinas tweeted that the cathedral remains closed while police conduct their investigation. It also said, "We ask for your prayers at this moment of deep pain."

The Rev. Amauri Thomazzi was leading the sermon, and later posted an emotional Facebook video in which he said, "A person entered the church shooting and left victims. We couldn't do anything to help them."

"There (were) more than 20 shots in here and he killed himself afterwards." he said. He also asked everyone to "pray for him (the shooter) and all those who were killed and injured" and added that everyone is "shocked by what happened."

Campinas Mayor Jonas Donizette declared three days of mourning in the city and tweeted, "I am numbed by the brutal crime that occurred at the Campinas Cathedral. My prayers go out to the victims and their families. The Municipal Guard and Paramedics are on the scene, their priority is to help the victims."