PHOTO: Ahmadiyya Muslim Community Mosque
Now playing
02:39
Teen opens mosque doors to shelter peers during shooting
FBI Director Christopher Wray testifies before the Senate Judiciary Committee on the January 6th insurrection, in the Hart Senate Office Building on Capitol Hill in Washington, DC on March 2, 2021. (Photo by MANDEL NGAN / POOL / AFP) (Photo by MANDEL NGAN/POOL/AFP via Getty Images)
PHOTO: MANDEL NGAN/POOL/AFP via Getty Images
FBI Director Christopher Wray testifies before the Senate Judiciary Committee on the January 6th insurrection, in the Hart Senate Office Building on Capitol Hill in Washington, DC on March 2, 2021. (Photo by MANDEL NGAN / POOL / AFP) (Photo by MANDEL NGAN/POOL/AFP via Getty Images)
Now playing
03:28
FBI chief refutes claims Antifa was at Capitol riot
PHOTO: KCAL/KCBS
Now playing
01:41
Multiple people killed in crash after SUV and semitruck collide
nigeria kidnapped schoolgirls released Busari pkg intl ldn vpx_00000423.png
nigeria kidnapped schoolgirls released Busari pkg intl ldn vpx_00000423.png
Now playing
02:09
Tears of joy and relief as 279 Nigerian schoolgirls return home
New satellite images taken by Maxar show that North Korea sometime in the past year built a structure that may be intended to obscure entrances to an underground facility where nuclear weapons or nuclear weapons components are stored.
PHOTO: Courtesy Maxar
New satellite images taken by Maxar show that North Korea sometime in the past year built a structure that may be intended to obscure entrances to an underground facility where nuclear weapons or nuclear weapons components are stored.
Now playing
01:47
See images US intelligence claims is a secret weapons site
NEW YORK, NY - JULY 23: New York Gov. Andrew Cuomo speaks during the daily media briefing at the Office of the Governor of the State of New York on July 23, 2020 in New York City. The Governor said the state liquor authority has suspended 27 bar and restaurant alcohol licenses for violations of social distancing rules as public officials try to keep the coronavirus outbreak under control. (Photo by Jeenah Moon/Getty Images)
PHOTO: Jeenah Moon/Getty Images
NEW YORK, NY - JULY 23: New York Gov. Andrew Cuomo speaks during the daily media briefing at the Office of the Governor of the State of New York on July 23, 2020 in New York City. The Governor said the state liquor authority has suspended 27 bar and restaurant alcohol licenses for violations of social distancing rules as public officials try to keep the coronavirus outbreak under control. (Photo by Jeenah Moon/Getty Images)
Now playing
02:29
NYT: Third woman comes forward against Gov. Andrew Cuomo
PHOTO: Courtesy Penguin Random House
Now playing
01:00
These 6 Dr. Seuss books won't be published anymore
John King Magic Wall 0301
PHOTO: CNN
John King Magic Wall 0301
Now playing
03:00
US coronavirus numbers coming down, but not enough
FILE - In this Jan. 29, 2011 file photo, Saudi journalist Jamal Khashoggi speaks on his cellphone at the World Economic Forum in Davos, Switzerland. Saud Al-Mojeb, Saudi Arabia's top prosecutor, is recommending the death penalty for five suspects charged with ordering and carrying out the killing of Saudi writer Jamal Khashoggi. Al-Mojeb told a press conference in Riyadh Thursday, Nov. 15, 2018,  that Khashoggi's killers had been planning the operation since September 29, three days before he was killed inside the kingdom's consulate in Istanbul. (AP Photo/Virginia Mayo, File)
PHOTO: Virginia Mayo/AP
FILE - In this Jan. 29, 2011 file photo, Saudi journalist Jamal Khashoggi speaks on his cellphone at the World Economic Forum in Davos, Switzerland. Saud Al-Mojeb, Saudi Arabia's top prosecutor, is recommending the death penalty for five suspects charged with ordering and carrying out the killing of Saudi writer Jamal Khashoggi. Al-Mojeb told a press conference in Riyadh Thursday, Nov. 15, 2018, that Khashoggi's killers had been planning the operation since September 29, three days before he was killed inside the kingdom's consulate in Istanbul. (AP Photo/Virginia Mayo, File)
Now playing
02:52
3 names mysteriously removed from Khashoggi Intel report
Protesters take cover behind homemade shields as tear gas is fired during a demonstration against the military coup in Yangon on March 1, 2021. (Photo by STR / AFP) (Photo by STR/AFP via Getty Images)
PHOTO: STR/AFP/AFP via Getty Images
Protesters take cover behind homemade shields as tear gas is fired during a demonstration against the military coup in Yangon on March 1, 2021. (Photo by STR / AFP) (Photo by STR/AFP via Getty Images)
Now playing
02:16
Footage shows tear gas, flash bangs used on protesters in Myanmar
New York Gov. Andrew Cuomo speaks during a news conference at a COVID-19 vaccination site in the Brooklyn borough of New York, Monday, Feb. 22, 2021. (AP Photo/Seth Wenig, Pool)
PHOTO: Seth Wenig/Pool/AP
New York Gov. Andrew Cuomo speaks during a news conference at a COVID-19 vaccination site in the Brooklyn borough of New York, Monday, Feb. 22, 2021. (AP Photo/Seth Wenig, Pool)
Now playing
01:12
Gov. Andrew Cuomo responds to allegations of sexual harassment
 Psaki biden White House Khashoggi Saudi Arabia sotu bash vpx _00011629.png
PHOTO: CNN
Psaki biden White House Khashoggi Saudi Arabia sotu bash vpx _00011629.png
Now playing
03:42
Bash to Psaki: Why hasn't Saudi Arabia been held accountable for murder of Khashoggi?
NEW YORK, NY - JULY 23: New York Gov. Andrew Cuomo speaks during the daily media briefing at the Office of the Governor of the State of New York on July 23, 2020 in New York City. The Governor said the state liquor authority has suspended 27 bar and restaurant alcohol licenses for violations of social distancing rules as public officials try to keep the coronavirus outbreak under control. (Photo by Jeenah Moon/Getty Images)
PHOTO: Jeenah Moon/Getty Images
NEW YORK, NY - JULY 23: New York Gov. Andrew Cuomo speaks during the daily media briefing at the Office of the Governor of the State of New York on July 23, 2020 in New York City. The Governor said the state liquor authority has suspended 27 bar and restaurant alcohol licenses for violations of social distancing rules as public officials try to keep the coronavirus outbreak under control. (Photo by Jeenah Moon/Getty Images)
Now playing
04:04
NYT: Second former aide accuses Gov. Andrew Cuomo of sexual harassment
PHOTO: CNN Weather
Now playing
02:23
Over 25 million people under threat for severe storms and flash flooding
House Speaker Nancy Pelosi
PHOTO: House TV
House Speaker Nancy Pelosi
Now playing
02:52
House passes Biden's $1.9 trillion Covid-19 relief package
PHOTO: CNN
Now playing
02:54
'Biggest trial of my life': Landlord says eviction moratorium has drained her savings
Jeremy Lin
PHOTO: Getty Images
Jeremy Lin
Now playing
03:40
Ex-NBA star Jeremy Lin says he's been called 'coronavirus' on the court
(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.

Her teacher asked someone to call 911 and then asked them to get out of the classroom. That’s when a peer suggested running to the mosque, according to Duaa.

“A guy yelled, ‘go, go to the mosque’ and that’s where everybody seemed to be going anyway, so I just tried to lock as many people in as I could” after entering the code to unlock the doors, she said.

Saad Ahmad, Duaa’s father, is the financial secretary at the mosque and works a few minutes down the road from the school. He told CNN all mosque members have a code to enter the building.

In the moments after the shooting, Saad said, everyone had limited information about what was happening and he couldn’t help but feel worried about his daughter’s safety.

“It was not a pleasant feeling at all, he said. “I was thinking the worst.”

Once Saad talked to Duaa and he found out that she had opened the mosque for her peers, he said he rushed over to help.

“I’m really glad she opened the mosque right away and took the initiative,” he said. “I was quite proud of her that she was able to handle this situation at such a young age.”

Duaa and Saad estimated there were about 100 students sheltered inside the mosque. The pair made sure everyone knew where the restrooms were, got water and felt comfortable until they were able to reunite with their parents.

Saad said the mosque has their own protocol if something were to happen there, but this was a unique situation since the kids were coming from the high school.

’Right time, worst situation’

Duaa said she just did what she thinks anybody else would have in her position.

“I was there at the right time in the worst situation,” she said.

Both the student and officer were treated at a hospital for non-life threatening injuries, police said. This was the second shooting to take place in a high school in the state in two days.

Oshkosh West has been out since the incident, according to the Oshkosh Area School District, but students will return to their normal schedules Friday.

The Oshkosh Ahmadiyya Muslims Facebook group posted about the Oshkosh incident, praising Duaa for her quick thinking and ended with the sentiment, “our doors are always open.”

CNN’s Ray Sanchez and Amanda Watts contributed to this report.