A teenager attacked a teacher with an ax, then opened fire with an air gun and threw smoke grenades in a school in Moscow Region, authorities said, adding that several schoolchildren were injured in the panic following the incident.

The incident took place in a local school in the town of Ivanteyevka, some 20km northeast of Moscow, police press office told TASS.

В Подмосковном городе Ивантеевка, школьник 9 класса пришел в школу с травматическим пистолетом и питардами, есть пострадавшие дети и учитель pic.twitter.com/KX2v8Ctxbe — Press Focus (@Press_Focusnik) September 5, 2017

“A 15-year-old student attacked an IT teacher …with a kitchen ax and hit her on the head. Then the teenager started detonating homemade firecrackers and shooting with an air gun,” the Russian prosecutor general said in a statement.

“At least four people have been injured, including three children and one teacher,” police press service told TASS.

The teenager has been detained and is currently being questioned, a local branch of the Russian Investigative committee said. Now the authorities have to determine the motives behind the attack, the statement added.

The moment of the attacker's apprehension was caught on camera.

The teacher was hospitalized in a serious condition.

Three schoolchildren, frightened by the attack, jumped out of windows and sustained injuries. They were also taken to hospital.

The lives of those injured as a result of the attack are out of danger, authorities say.

“I heard shots, sounds of firecrackers. We escaped via emergency exits. There was smoke everywhere. I heard shouting,” another student, who was at school at the time of the attack, told RT.

She said she knew the perpetrator and identified him as Mikhail. “He was a very introverted person,” she said.

“Everyone says that he was strange. Some say that he had wanted to do this for a long time. But everyone thought he was joking,” she said.

“We saw a broken window and the teacher being taken to hospital,” another student told RT. She also claimed she had heard that the attacker has always wanted to “blow the school up” and had planned the incident beforehand.

The teacher underwent surgery and is now in a satisfactory condition, the committee said. She later told local media that her attacker was shouting that he had “waited for this for 3 years”.

“I was hit in the head with a kitchen ax and then [he] shot me in the face,” she told Rossiya 24.

On what appears to be his VKontakte (top Russian social network) page, discovered by Russian media, Mikhail has adopted the last name Klebold – the same as one of the attackers in the fatal Columbine High School shooting of 1999. The page features numerous photos of firearms, the teenager shooting, as well as some references to Columbine.

His status reads "delete my life 05.09.17."

The Russian authorities have opened a case into hooliganism following the attack.

The school has been closed for the day, school authorities told TASS.

“The children were sent home. The school will be closed today. Classes start tomorrow,” the statement added.