image source, Getty Imagesimage captionHundreds of people, many of them students, gathered outside the university on Tuesday
There is deep shock and a day of mourning in Perm, after a gunman killed six people and wounded 24 others at the local university.
The attacker was a first-year student, named locally as Timur Bekmansurov, 18, and most of his victims were fellow students.
At the university they instinctively knew how to act. Students told me they barricaded themselves inside classes and kept away from windows. Some hid on the floor and under desks.
Months ago there was a deadly shooting at a school in the Russian city of Kazan, so many of them had that on their minds. And students here reminded me that a secondary school teacher in the Perm region was wounded by a student who stabbed her last May.
Perm – 1,300 km (800 miles) east of Moscow – is quiet and subdued, particularly around the university. People are standing around in silence, some are wiping away tears and hugging each other.
image captionFlowers and candles were left outside the university gates
The university has been cordoned off but some 300 people gathered outside the main gate. Around a dozen desks were placed just outside the gate and a makeshift memorial has been created.
Three of the victims were teenagers.
Who died at Perm University
Ksenia Samchenko – 18; Yekaterina Shakirova – 19
Yaroslav Aramelev – 19; Alexandra Mokhova – 20
Anna Aigeldina – 26; Margarita Engaus – 66
People are laying flowers, lighting candles and even bringing toys. They are mainly students who under normal circumstances would be coming in for their classes.
They are struggling to come to terms with what happened, describing their city as "crushed by tragedy".
Around midday a priest came to offer comfort to the students.
image captionA local priest addressed people who gathered outside the university gates in Perm
Not many are willing to talk, preferring to be alone with their grief.
Eyewitnesses said the gunman began shooting outside, on the university campus, before going into one of the buildings. There were around 3,000 students and teachers on the university premises at the time.
A teacher told the BBC that he heard students screaming and then saw them running and jumping out of windows.
Two students told me how they were in a different university building and didn't hear the shots but soon realised what was going on. Their teacher received a message and they started seeing messages on chats and social media.
Another student told Russia's Kommersant website that his teacher tied the handles of the door together just before the attacker tried to get inside.
"There was no key and the door was open. She tied the handles with a piece of cable. He tried to force the door. When it wouldn't open, he shot at the door and then once at the wall and then kept walking along the corridor."
image source, Russian Investigative Comittee
Named locally as 18-year-old law student Timur Bekmansurov, the gunman was eventually shot and wounded.
Police have revealed that the shotgun he used was legally bought by him in May and that he had a permit valid until 2026. Local MP Alexander Khinshtein said he had obtained the permit before rules were tightened up after the Kazan school shooting in which nine people died.
He has been described as consumed by hatred of others. "I've thought about this for a long time, it's been years and I realised the time had come to do what I dreamt of," he wrote on a social media account before it was taken down.
Two students who live in halls of residence at the university told me that most students were now under police lockdown and could not leave while police were continuing their investigation.
Elsewhere, hundreds of people visited a mobile blood donation centre, volunteering their help. Most of them were non-students who saw an appeal on social media.
Amid the grief in Perm, two traffic police are being praised for their response to the shooting. While Vladimir Makarov led students and teachers to safety, Konstantin Kalinin confronted the attacker inside a university building, opening fire when he was shot at.
"The young man fell down. I ran up to him, restrained him, pushed away his rifle, bullets and knife and then started giving him first aid," said Jnr Lt Kalinin in a video published by Russia's interior ministry.
Additional reporting by Kateryna Khinkulova.