A maths teacher has been hailed a hero for her quick response and bravery during the Florida high school shooting.

Mrs Shanthi Viswanathan, known as 'Mrs V' to her pupils, saved the lives of many children in her school as a gunman began his murderous rampage at Stoneman Douglas High School on Wednesday 14 February.

At least 17 people were killed when former student Nikolas Cruz opened fire at the school in Parkland.

The attack began around 3pm local time when the teenager set off the fire alarm, apparently with the cruel intention of gathering students in the hallway to maximise the number of victims.

However, when a second fire alarm rang, Mrs Viswanathan's suspicions were roused and instead of leading her students out of the class room, she locked the door and told them all to crouch on the ground in the corner of the room as she covered the windows with paper.

Dawn Jarboe, the mother of one of the students, said the teacher's quick actions saved many lives. "She was quick on her feet. She used her knowledge. She saved a lot of kids."

Shanthi Viswanathan
Mrs Shanthi Viswanathan has been hailed a hero after her quick actions during a Florida school shooting saved her students lives Stoneman Douglas school

So determined was she to protect her students, that even when a SWAT team demanded that she open the door, she refused, fearing that it might have been a ploy by the gunman to gain access to the room.

Jarboe added: "She said, 'Knock it down or open it with a key. I'm not opening the door."

SWAT teams smashed through the window to gain entry to the room, and the students were led to safety.

A popular teacher at the school, Mrs Viswanathan was known for her dedication to her students. On the Rate My Teacher website, a student decribed her as a 'wonderful teacher ... who cares about students."

Cruz, who had been expelled from the school last year, had been identified as a potential threat to fellow students in the past. The 19-year-old, who was arrested 40 minutes after the massacre, was handcuffed when he arrived in court, where he was remanded in custody after being charged with 17 counts of premeditated murder.

Cruz's lawyer, Melissa McNeill, told reporters on Thursday that he was "sad", "mournful" and "remorseful", adding that he was a "broken human being" who was aware of what was going on.

The attack is the deadliest school shooting since 26 people were killed at Sandy Hook Elementary School in Connecticut in 2012.