Two men have admitted burning a father, mother and their 5-year-old son to death inside a car after robbing them, authorities said Wednesday.

After robbing the family, the men decided to kill them because the mother had recognized one of the attackers, said Luciana Oliveira, a police spokeswoman in the small city of Braganca Paulista, 60 miles north of Sao Paulo. Another woman inside the car survived with severe burns.

After being arrested Tuesday, the suspects admitted they tied up the victims in the car, doused it with gasoline and set it ablaze, Oliveira said.

Joabe Severino Ribeiro, 36, and his brother-in law were taken into custody two days after the killings. Oliveira identified the brother-in-law only by his first name, Fernando.

Following the arrests, about 50 people tried to break in the police station where the suspects were being held, trying lynch them. Authorities managed to transfer the suspects to an unidentified jail and there were no reports of injuries during the fracas, Oliveira said.

Robbers armed with guns invaded the home of Leandro Donziete de Oliveira (no relation to the police spokeswoman) and Eliane Faria da Silva on Sunday afternoon and took them hostage, along with the couple's 5-year-old son, Vinicius.

Police say the attackers then drove the hostages to a store run by Silva and took 20,000 Brazilian reals ($9,400). From there, they took the hostages and store worker Luciana Michele Dorta to a deserted road.

At some point, Silva recognized Ribeiro's brother-in-law and the attackers decided to kill the family to avoid having her identify them to police, authorities said.

The couple died in the car, and the boy died Tuesday after suffering burns on 90 percent of his body. Dorta was still hospitalized Wednesday in serious condition.

Ribeiro was initially questioned by police because his hands were burned. He first said he suffered the injuries in an accident at work, but later confessed and told police that his brother-in-law participated, authorities said.