MOSCOW—A gunman attacked a school Tuesday morning in the Russian city of Kazan, killing eight people—seven eighth-grade students and a teacher—and leaving 21 others hospitalized with wounds, Russian officials said. Russian media said some students were able to escape the building during the attack, while others were trapped inside. Students were eventually evacuated to nearby kindergartens and collected by their families. Dozens of ambulances lined up at the entrance to the school after the attack, with access to the building fenced off by police. Police opened a criminal investigation into the shooting. Rustam Minnikhanov, governor of the Tatarstan republic where Kazan is the capital, said four boys and three girls, all eighth-grade students, died in the shooting. Minnikhanov’s press service later said a teacher was also killed. “The terrorist has been arrested, (he is) 19 years old. A firearm is registered in his name. Other accomplices haven’t been established, an …