(CNN) Thanks to a Wisconsin student's quick thinking, about 100 students were able to take shelter at her mosque during a school stabbing and shooting on Tuesday.

The Ahmadiyya Muslim Community's Oshkosh chapter mosque is across the street from Oshkosh West High School, where police said a 16-year-old student stabbed an officer with an "edged weapon" before being shot by the officer.

Surveillance video from the mosque shows the moment one of its members, Duaa Ahmad, a high school student at Oshkosh West, jumped into action and entered the security code -- opening the mosque for her peers to safely shelter.

'Go, go to the mosque!'

Duaa, 17, told CNN she was in her AP English literature class when she said they heard a gunshot, which at the time she thought was just a door slamming shut.

Read More