BEIJING -- Chinese police have released surveillance video of a stabbing spree that left 23 students wounded at an elementary school.
The video made public late Tuesday shows dozens of students running out of a gate in panic after a knife-wielding man stormed in, apparently having slashed at a girl along the way.

The video released by local police to state-run China Central Television offers the first images from Friday's attack in Chenpeng village in central China. Police have arrested a suspect, Min Yongjun, on a charge of jeopardizing public security.

Citing local police, the official Xinhua News Agency said Min, driven by doomsday rumors, wanted to "do things to impress the world of his existence" before his death. Some people believe the Mayan calendar predicts an apocalypse this Friday.

Xinhua said Min, 36, has epilepsy but that police believe the man was capable of self-control at the time of the stabbing spree.

It said Min had beaten his parents and daughters on Thursday night, left home and wandered around for the night before he broke into an elderly woman's house, where he wounded her by stabbing her twice with a kitchen knife.

Min then went to the elementary school around 7 a.m., where some students had arrived early to do cleaning and preparation work, Xinhua said.

In the surveillance video, a man in blue is seen running through an unguarded school gate while chasing after and slashing at a girl, who stumbles but – after the man leaves – stands up, picks up her school bag and walks out of the gate.

Then, dozens of students flee out of the gate before several men armed with brooms walk in. The man in blue later is seen being chased out of the school.

Deputy Principal Li Chuanbao told state-run China News that there were casualties on the stairs because students on higher floors left their classrooms and ran down to check out the stir.

"They didn't know there was a stabber out there," Li said.

Li told China News that the attacker stabbed seven first-graders on the first floor.

Xinhua said eight of the 23 students stabbed have been transferred to a hospital in a neighboring province for surgeries for facial wounds so they can have less noticeable scars.

Classes at the school resumed Monday with empty seats but tighter security, according to state media reports.

Related on HuffPost:

Loading Slideshow...
  • Fish Spa In Thailand

    In this Wednesday Dec. 12, 2012 photo, fish nibble the dead skin off a pair of feet during a fish-spa session in a popular tourist destination in Bangkok, Thailand. (AP Photo/Nick Perry)

  • Kite Princess In Mumbai

    Meera, a young Indian girl, walks to sell paper wheels at the Arabian Sea coast in Mumbai, India, Tuesday, Dec. 11, 2012. Meera who attends a government school, works5 after school hours to support her family who make a living selling paper wheels. (AP Photo/Rafiq Maqbool)

  • Saint Lazaro In Cuba

    Esilda Espinosa sits next to a statue of the Catholic saint Lazaro, as she waits for a passersby to donate alms that she will use to finance a celebration on the saint's feast day in Havana, Cuba, Friday, Dec. 7, 2012. Affectionately known as "El Viejo Lazaro," or the Santeria equivalent, Babalu Aye, the religious icon is usually represented wearing ragged clothes and with dogs licking the sores on his feet. Both the Catholic saint and the Santeria Orisha are associated with suffering and disease and are honored by their devotees on Dec. 17. (AP Photo/Franklin Reyes)

  • Chavez Virgil In Venezuela

    A person holds up an image of Venezuela's President Hugo Chavez among religious images during a demonstration in support of him at the Simon Bolivar square in Caracas, Venezuela, Sunday Dec. 9, 2012. (AP Photo/Fernando Llano)

  • Mask Carving Workshop In Nepal

    A Nepalese woman paints a mask at a workshop in Changunarayan, on the outskirts of Katmandu, Nepal, Sunday, Dec. 9, 2012. Traditional masks that reflect Nepalese culture and religion, are sold as souvenirs to attract tourists into the country as well as being worn during festivities. (AP Photo/Niranjan Shrestha)

  • Hindu holy woman, Shivani Aum Datri from northern California, USA, plays with a stray dog by the Ganges River in Varanasi, India, Thursday, Dec. 13, 2012. Varanasi is among the world's oldest cities, and millions of Hindu pilgrims gather annually here for ritual bathing and prayers in the Ganges River, considered holiest by Hindus. (AP Photo/Rajesh Kumar Singh)

  • Gay Marriage In Seattle

    Brendon Taga, left, and Jesse Page, of Vashon Island, Wash., take their wedding vows in the King County Courthouse, Sunday, Dec. 9, 2012, in Seattle. Gov. Chris Gregoire signed a voter-approved law legalizing gay marriage Wednesday, Dec. 5 and weddings for gay and lesbian couples began in Washington on Sunday, following the three-day waiting period after marriage licenses were issued earlier in the week. (AP Photo/Elaine Thompson)

  • Waffle Point Car In Cairo

    A car is parked in front of a waffle shop in Cairo, Egypt, Tuesday, Dec. 11, 2012. (AP Photo/Petr David Josek)

  • Hanging Tea Cups In China

    A Chinese couple, center, chats each other near cups painted with various themes on display at the Parkview Green FangCaoDi shopping complex in Beijing Tuesday, Dec. 11, 2012. (AP Photo/Andy Wong)

  • Maya Ceremony

    Cubans participate in a Mayan ritual at Bacuranao beach in eastern Havana, on December 6, 2012. (ADALBERTO ROQUE/AFP/Getty Images)

  • Scuba Santa In South Korea

    Dressed in a Santa Claus outfit, a diver feeds to sardines at the Coex Aquarium in Seoul, South Korea, Tuesday, Dec. 11, 2012. Christmas is one of the biggest holidays in South Korea, where over half of the population are Christians. (AP Photo/Ahn Young-joon)