The UN chief was saddened to learn about their deaths, his Spokesperson, Stéphane Dujarric, said in a statement.
“He strongly condemns this act of senseless violence and expresses his deepest condolences to the victims’ families, as well as the Government and people of the Russian Federation”, Mr Dujarric said.
Kazan is the capital and largest city in the Republic of Tatarstan, and is located some 500 miles east of Moscow.
The attack took place around 9:20 AM, local time, according to media reports. A 19-year-old man was detained and investigations are underway.
At least 21 other people, mainly children, were injured in the shooting, and the Secretary-General has wished them a speedy and full recovery.