Stunned family members on Thursday prepared to bury the eight victims of a school shooting in Brazil, along with the two attackers who carried out the violence, and grappled to understand why the bloodshed took place.

A collective wake for six of the victims was held in a large sports arena in this city on the eastern outskirts of metropolitan Sao Paulo. Lines of mourners snaked outside the building, while inside, grief-stricken family members hugged and cried over caskets holding the teenagers killed.

The attack has shocked Brazil, a country with the world's highest number of murders but where school shootings are relatively rare. The rampage has raised tough questions about just how to deal with a wave of violence that helped pave the way for the election of far-right President Jair Bolsonaro.