A teacher and policeman have been killed by an armed teenager who burst into his Moscow school before being arrested.
None of the children at the school were hurt, according to police.
The student also injured a second police officer who had responded to an alarm from the school.
A spokesman for Russia's main investigative agency said the student showed up at the school with a gun and a school security guard tried to stop him. The guard was able to hit an alarm button before following the student to a biology class.
The student shot dead a teacher and opened fire on police officers who responded to the alarm, a spokesman for the Investigative Committee, said in a statement.
The student fired at least 11 times from a small-calibre rifle.
The statement said the boy was an excellent student and apparently had had an emotional breakdown.
Investigators are questioning him, his classmates and the security guard.
The student was also carrying a carbine, a short-barrelled rifle, Moscow police chief Anatoly Yakunin said. Both rifles belonged to his father and were legally registered.
Gun ownership is legal in Russia but weapons need to be registered.
Such shootings in Russian schools are rare but Moscow mayor Sergei Sobyanin has called for a full review of security systems in city schools in light of the attack.