Thousands of people have attended a wake for victims of a school shooting near the Brazilian city of São Paulo.
Two former pupils, aged 17 and 25, killed eight people on Wednesday, in an attack police say was planned for more than a year.
Family members and friends wept over the open coffins of four teenage boys before their funerals.
The young gunmen killed a total of five pupils, a school administrator and a teacher before killing themselves. Earlier, they had shot dead the uncle of the 17-year-old.
A state official said the younger gunman “had never shown any problems” at school, but his mother said he had been bullied.
Seventeen-year-old Guilherme Taucci Monteiro and 25-year-old Luiz Henrique de Castro arrived at the Raul Brasil school in Suzano at 09:30 local time (12:30 GMT) in a white car stolen from his uncle’s car rental agency.
A recording from a CCTV camera at a nearby house shows the passenger, Monteiro, getting out of the car and putting a rucksack on his back before calmly walking through the school gates.
Castro follows him at a much faster pace 30 seconds later, also with a rucksack on his back. Neither is masked or hooded at the time.
As it was break time, many pupils would have been in the school yard. The school has about 1,000 students aged between 11 and 16. Twenty seconds after Castro runs through the school gates, pupils can be seen fleeing in panic.
CCTV footage recorded inside the school entrance hall shows Monteiro wearing a baseball cap calmly walking into the building.
He briefly turns his back to a group of pupils who are milling about before pulling a gun from his trousers. The footage shows him pointing the gun at pupils’ faces.
Investigators think the first person to be killed inside the school was Marilena Ferreria Umezu, the educational co-ordinator of the school.
They think the gunmen next headed to school yard and then to the school’s language centre, where some pupils and teachers had barricaded themselves in a classroom after hearing gunshots.
Footage recorded inside the school corridors shows a number of victims lying in pools of blood on the floor.
Police arrived at the scene eight minutes after the shooting started. By the time they arrived, the two gunmen were dead.
Monteiro shot dead Castro at close range before turning the gun on himself in an apparent suicide pact as the police officers could be heard approaching.
Both Monteiro and Castro had been pupils at the Raul Brasil school. Monteiro, the younger of the two gunmen, had left the school in 2018 but it is not clear if he was expelled or had left of his own accord.
The two had been close friends since childhood and spent a lot of time together playing video games and were often seen at a local gaming arcade.
Monteiro was raised by his grandmother as his mother reportedly had “addiction problems”.
His mother told Folha newspaper that her son had been bullied because of his acne, and one of his friends also told local media that Monteiro had complained about being “harassed” by a fellow pupil.
Rossieli Soares, who is São Paulo state’s education secretary, said Monteiro had studied at the Raul Brasil school for two years and “had never caused any trouble”.
Investigators say Monteiro was the one who made the plan to attack the school and who was “the leader”. They say that he may have been planning the attack for more than a year.
Neighbours described Castro as a quiet young man whose family members kept themselves to themselves.
Minutes before the attack, Monteiro posted photos of himself wearing a skull mask and holding a gun. Police also found a notebook in the car in which were drawings of weapons and slogans such as “Can’t run”.
While gun crime is widespread in Brazil, school shootings are not. The incident in a middle-class neighbourhood has shocked the nation.
The commander of police forces in São Paulo, Marcelo Salles, said he had “never seen anything like this”.
President Jair Bolsonaro described it as “a monstrosity and enormous cowardice”.