A gunman attacked a school in Kazan, the capital of Russia’s Tatarstan republic, Tuesday morning at 9:30 am, sending students running out of the building as smoke poured from its windows.

Citing officials, Russian media reports say at least eight people were killed in the attack — seven eighth-grade students and a teacher — and 21 others were hospitalized.

Russian media said while some students were able to escape, others were trapped inside during the ordeal.  All students were eventually evacuated to nearby day care centers and collected by their families.

Officials said the attacker has been arrested and police launched an investigation into the shooting.

Tatarstan governor Rustam Minnikhanov said after visiting the school that the terrorist had been arrested.  He is reportedly 19 years old and a firearm is registered in his name. 

Additional security measures were immediately put into place in all schools in Kazan.  The authorities also announced a day of mourning on Wednesday to honor the victims of the shooting, and said all lessons will be cancelled in Kazan schools that day.

RBC says that according to Tatarstan health officials, 21 people were hospitalized with wounds after the attack, including 18 children, six of whom were in “severely grave condition.”

Russian media said the shooter was a former student of the school who reportedly called himself “a god” on his account in the messaging app Telegram and promised to “kill a large amount of biomass” on the morning of the shooting.  The account was blocked by Telegram after the attack, the independent news outlet Meduza said.

Tass says Russia's Emergency Ministry sent a plane with doctors and medical equipment to Kazan.