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.
What happened on Wednesday?
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.
Who were the victims?
Before Monteiro and Castro went on their killing spree at the Raul Brasil school, they stopped at a car rental agency owned by Monteiro's uncle, 51-year-old Jorge Antonio Morais.
Mr Morais had reportedly given Monteiro a job washing cars at his rental agency two years ago, but had sacked him after only two months. Mr Morais' parents did not say why their son had fired Monteiro, but some media have speculated about whether the boy may have still been angry over the incident.
Mr Morais had also encouraged Monteiro to return to school after he had stopped going at some point last year.
An eyewitness said Monteiro walked into the car wash, called out the name of his uncle, who was speaking on the phone at the time, and shot him dead.
The second person to be killed was Marilena Ferreria Umezu, who has been described as one of the most popular staff members by her former pupils, who said she was always smiling.
Ms Umezu, who was 59, opposed a recent change to Brazil's laws which makes it easier for people to buy firearms. On her Facebook account, she shared a cartoon reading: "We support the carrying of books, because they're the best weapon to save the citizen and the education [system]."
Another school official, 38-year-old Eliana Regina de Oliveira Xavier, was the third adult to be killed.
Five pupils were also among the victims. They are:
- Caio Oliveira, 15, described as a studious boy who had many friends
- Douglas Murilo Celestino, 16, who died on the way to hospital. His family said he had "no malice" and was a keen skater and football player. His parents say he had already fled the building when he noticed his girlfriend had not made it out. He was killed when he returned to get her. She is among the injured.
- Samuel Melquiades Silva de Oliveira, 16, a religious boy who wanted to become an artist, he especially loved design
- Claiton Antonio Ribeiro, 17, described as a bookworm, a quiet and modest teenager who was close to his parents
- Kaio Lucas da Costa Limeira, 15
What is known about the gunmen?
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".
What weapons did they have?
- A revolver, which had been carried and fired by Monteiro
- A crossbow
- A traditional bow and arrow
- Petrol bombs
- An axe
What's the reaction been?
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".