Inmates in one of Brazil's roughest prisons used explosives to destroy a wall and escape en masse into surrounding streets, prompting a frantic manhunt.
Media footage of the brazen breakout on Saturday in the northeastern city of Recife showed the blast ripping a hole in the main wall around the Frei Damiao de Bozanno facility.
After a cloud of dust and debris clears, a stream of men dressed in ordinary clothing can be seen dashing into the narrow streets before police arrive on the scene.
Pernambuco state justice authorities were quoted by Globo news site saying Sunday that 40 inmates escaped and that 36 had now been returned to custody, two killed, one hospitalized and one remained at large.
It took hours for officials to give figures, with Brazilian media initially reporting that as many as 100 prisoners could have got out.
One of those killed was shot after breaking into a local home, police said on Globo television. Footage showed the man lying in a pool of blood on the floor.
This was the second mass breakout in the same area in a week. Fifty-three inmates fled Wednesday from the Professor Barreto Campelo prison, near Recife, and by Sunday only 13 of them had been recaptured, G1 news site reported.
Escape attempts are frequent at Pernambuco prisons, the most overcrowded in Brazil. Facilities designed for 10,500 inmates maximum hold around 32,000 people, according to a 2015 study by Human Rights Watch.
Many prisoners have to sleep on the floor and there are so few guards that officials turn day-to-day control over to selected inmates who are given keys to the prison's interior, the report said.