An Indiana middle school science teacher was being hailed for his quick actions Friday after he reportedly tackled a student who barged into his classroom and opened fire.

The teacher, Jason Seaman, and a 13-year-old female student were both wounded by gunfire inside the Noblesville West Middle School and were being treated at area hospitals, police said.

The student who was injured was in critical condition, police said Friday evening; the girl's family said that she is stable and is doing well at the hospital. Seaman said in a statement that he was injured but "doing great."

Meanwhile, police were questioning the shooting suspect — a male student — and trying to come up with a motive, Noblesville Police Chief Kevin Jowitt said.

It was not immediately clear where the student got the two weapons he was armed with, how he got them into the school, or whether he was targeting anybody in particular.

"The preliminary information is that a male student asked to be excused from his class," Jowitt said. "He left the classroom. He then returned with two handguns."

Jowitt said the police are still investigating "what happened in the classroom" and added, "It was resolved pretty quickly."

But seventh-grader Ethan Stonebraker said Seaman, who is also one of the school's football coaches, probably averted a massacre at the school, which is located 20 miles north of Indianapolis.

Students outside Noblesville West Middle School after a shooting on Friday. Kevin Moloney / Getty Images

"Our science teacher immediately ran at him, swatted a gun out of his hand and tackled him to the ground," Stonebraker told The Associated Press. "If it weren't for him, more of us would have been injured for sure."

Seventh-grader David Veschak told NBC News that he was in the classroom next to Seaman's when he heard "a really loud noise."

"I thought someone dropped a science book,” he said.

The next thing he heard was Seaman yelling for somebody to call 911.

Seaman's brother Jeremy told The Indianapolis Star that he was a former defensive end for Southern Illinois University — and a gutsy guy.

"It’s not surprising, to be honest," he said of his brother’s reported heroics. “He’s not really ever been the person to run away. When the safety of the kids is at hand, it’s not surprising to me that he was going to do what he had to do.”

A short time later, Seaman weighed in himself in a statement obtained by Jim Johnston, a photographer for local NBC affiliate WTHR:

A statement from Jason Seaman the Noblesville West Middle school teacher who stopped the shooter. pic.twitter.com/qJgfDYGiKh — Jim Johnston (@JJohnstonWTHR) May 25, 2018

The shooting at the school, which has more than 1,300 pupils, was reported at 9:06 a.m., Jowitt said.

Eighth-grader Chris Navarro said he was inside an auditorium and waiting for the bell to change classes when he heard what sounded like 16 gunshots.

"The speaker came on and said we were on lockdown and people rushed in and we went to the back of the room," he told the AP. "I went into this little room in the back with three other people."

Noblesville Mayor John Ditslear said city officials were still trying to get their heads around the sad fact that a school shooting happened in Noblesville.

"You hear about these shootings around the country," he said at a news conference. "You just never think it could happen in Noblesville, Indiana. It is a very sad day that we have to go through this in our beautiful city."

A student and an adult embrace outside Noblesville West Middle School after the shooting. Kevin Moloney / Getty Images

Police said officers responding to the shooting found the suspect and the two wounded people in a classroom. The suspected shooter was not injured, police said.

The 13-year-old student who was injured in the shooting was identified by her family as Ella Whistler. The family in a statement to WTHR said the girl "was involved in a horrific shooting today at her school."

"We'd like to thank everyone across the country who prayed for our family today. We've felt those prayers and appreciate each of them," the family said in the statement. They also thanks all the first responders and the medical staff and surgeons at Riley Hospital for Children.

Nearby Noblesville High School was also placed on lockdown for about an hour after police received what Jowitt called a "communicated threat" that they were investigating.

It came as panicked middle school parents were rushing to the high school to pick up their kids, who had been bused there.

Karen and I are praying for the victims of the terrible shooting in Indiana. To everyone in the Noblesville community – you are on our hearts and in our prayers. Thanks for the swift response by Hoosier law enforcement and first responders. — Vice President Mike Pence (@VP) May 25, 2018

"They let some parents in and then they locked down the school," one mother, who was forced to wait an hour before she could collect her daughter, told WTHR.

The latest school shooting took place just a week after 10 people were killed at Santa Fe High School, outside Houston. A 17-year-old student has been charged with multiple counts of murder.

CORRECTION (May 25, 2018, 6:32 p.m.): A previous version of this article misspelled the last name of a student at Noblesville West Middle School. He is David Veschak, not Verschak.