Mourners left flowers and candles outside Perm State University, around 800 miles east of Moscow, after the gunman went on a rampage, killing at least six people and injuring many more.
The gunman was wounded after resisting arrest, and was being treated in hospital, the Investigative Committee law enforcement agency said in a statement.
University spokesperson Natalia Pechishcheva earlier said the shooter had been "liquidated" but later said he was in police custody. Footage from the scene showed his body lying on the ground outside the university building.
Local media identified the gunman as an 18-year-old student who had earlier posted a photo of himself on social media, posing with a rifle, helmet and ammunition. That photo could not be independently verified.