This is the moment a gunman's attempted robbery on young children and families waiting outside a school in Sao Paulo was foiled by a mother who turned out to be an off-duty armed policewoman.
Security cameras outside the private school in Sao Paulo caught the dramatic moment on Saturday morning around 8am local time.
Military police officer Katia da Silva Sastre, 42, rounded on the gunman, identified as Elivelton Neves Moreira, 21, and surprised him by whipping out her weapon and firing three times, the Daily Mail reports.
The suspect died later the same day in the hospital from his injuries, but Officer Sastre is still being commended for her actions despite the "regrettable" outcome.
The horrific attack unfolded Saturday as Sastre was waiting for the gates of Ferreira Master school to open.
That's when a man, dressed in a black jacket, casually walks up and announces it's a robbery while pointing a .38 revolver at the group of terrified mothers and small children.
The school, in the Jardim dos Ipês suburb of the city, was due to host a Mother's Day party.
Pointing the gun at the school's security guard and reaching out to grab the man's wallet and phone, the suspect is suddenly stopped in his tracks by the officer, who had her gun at the ready after being alerted to the danger by another woman seconds earlier.
Pulling her police-issued weapon from her bag, she loads the gun then reacts with speed, stepping forward and firing off three rounds, shooting the assailant in the chest and leg as he tries to fire back.
The armed man falls backwards onto the zebra crossing and releases two shots in the process as he hits the ground. The first one ricochets off the ground hitting no one, and the second jams in the weapon.
Sastre quickly backs away out of the line of fire then goes over to the injured suspect who is rolling around on the ground in agony crying out for help. She kicks away his weapon before picking it up.
Sastre, who had gone to the event with her 7-year-old daughter, told colleagues: "I didn't know if he was going to shoot the kids or the mothers or the security guard at the school door.
"I just thought about defending the mums, the children, my own life and my daughter's."
Approaching the wounded assailant while still pointing her gun, she throws her bag to one side, orders the suspect to turn over and pushes him with her foot into a facedown position, then pins him down while waiting for medical help and backup to arrive.
Speaking on her act of valour she said: "I had to act quickly to end his aggression and prevent him from harming anyone. I reverted to the training I have received in the corporation.
"It's gratifying to have been in the right place to have saved all our lives," she added revealing she was first warned of the danger when a woman, in a grey dress, hurriedly walked past and pointed backwards saying a robbery had just taken place behind her.
Moments later the gunman appeared.
Husband of officer Sastre, military police lieutenant André Alves said to Folha de Sao Paulo: "The suspect's gun fired once, but it is not known whether or not it was before Katia fired.
"The first shot ricocheted and got lost. On his second attempt at firing, the weapon locked. Thankfully she was faster than him, because when a thug discovers [their opponent] is a police officer, he shoots to kill."
Officer Sastre is being hailed a hero for her act of bravery and was honoured in a ceremony by Sao Paulo Governor Márcio França.
Writing on Twitter Governor França said: "I went earlier to the 4th BAEP in the east of Sao Paulo to honour a very special mother: Corporal Katia Sastre. Her courage and precision saved mothers and children, yesterday at the door of a school".
The governor then presented her with a purple orchid plant as a thank you for her off-duty valour at her police station, fittingly on Brazil's Mother's Day.
Officer Sastre is a mother to two girls, aged 7 and 2. She has worked on the force for 20 years.
Governor França commended Sastre saying she had shown "dexterity, technique and courage".
He explained the "homage was made because it's Mother's Day and because she is a mum".
"She went to the party to celebrate the date and a situation like this happened. She acted so precisely, so perfectly, that we decided to honour her," the governor told Folha.
Public security secretary, Maggie Alves said: "She pushed the children out of the way and approached the thief. She shoots, the boy shoots, the boy tries to shoot at her leg. She immobilises the boy and calls the [emergency services]. It was a perfect procedure from a technical point of view."
However, governor França lamented the outcome as "sad and regrettable".
"It is not ideal that the suspect died. We would have preferred this had not happened. But it is a warning to those who take up a gun that they could be killed because our security professionals are well trained to protect the public," he said.