“Eight schoolchildren and a teacher were killed,” a source told the Interfax news agency.
Ten more people were injured, said state news agency TASS.
Spokespersons for police and the emergencies ministry refused to comment.
News agencies reported that two unidentified people had carried out the shooting and one, a 17-year-old, had been detained.
Images broadcast on state television from the scene showed dozens of people outside the school building with fire services and police vehicles lining nearby streets.
A source told the Interfax news agency that a second shooter had barred himself in on the fourth floor of the building.
The TASS state news agency, citing sources in the emergency services, said that 10 people had been injured and were rushed to hospital.
“I was in class, I first heard an explosion, then gunshots,” TASS quoted a teacher as saying.
The city administration was cited as saying that children were evacuated from the school and that security had been bolstered at other educational facilities in the city.
Another source cited by the RIA Novosti agency said they had heard an explosion and could see smoke rising from the building.
Tatarstan President Rustam Minnikhanov had arrived at the scene of the shooting, news agencies reported.
Russia has relatively few school shootings due to normally tight security in education facilities and the difficulty of buying firearms legally, although it is possible to register hunting rifles.