This is the moment a gunman's attempted robbery on young children and families was foiled by a waiting mother - who turned out to be an off-duty armed policewoman.

Dramatic security footage shows a suspect named as Elivelton Neves Moreira, 21, approaching the crowd with a gun outside a private school in Sao Paulo.

But his attempted crime backfired when military police officer Katia da Silva Sastre, 42, pulled out her own weapon and unleashed three shots.

The video shows Moreira, who later died in hospital, falling backwards and clutching his chest before Sastre shoves him on to his front with her foot having thrown her handbag aside on Saturday morning.

Officer Sastre is being hailed a hero for her act of bravery and was honored in a ceremony by Sao Paulo Governor Márcio França on Sunday.

The robber, dressed in a black jacket, was seen on a security camera approaching a private school in Sao Paulo before aiming a gun at terrified mothers

Backfire: The robber, identified as Elivelton Neves Moreira, 21, paid the price for his attempted crime when military police officer Katia da Silva Sastre, 42, pulled out a gun and shooting three times

Dramatic footage shows the robber tumbling backwards after being shot by the quick-thinking mother-of-two

Officer Sastre shoved the suspect on to his front using her foot before aiming her weapon at his back. The robber died from his injuries the same day - but Sastre was commended for her actions

Although the suspect died later the same day in the hospital from his injuries, Officer Sastre is still being commended for her actions despite the 'regrettable' outcome.

Writing on Twitter Governor França said: 'I went earlier to the 4th BAEP in the east of Sao Paulo to honor a very special mother: Corporal Katia Sastre. Her courage and precision saved mothers and children, yesterday at the door of a school.'

As a thank you for her off-duty valor, the governor then presented her with a purple orchid plant at her police station, fittingly on Brazil's Mother's Day.

Officer Sastre is a mother to two girls, aged seven and two. She has worked on the force for 20 years and is also married to a police lieutenant.

The horrific attack unfolded Saturday as Sastre was waiting for the gates of Ferreira Master school to open.

A bandit, dressed in a black jacket, casually walked up and announced it was 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.

Flashpoint: The gun-wielding robber (dressed in black) lunged towards terrified parents outside the school in Brazil

Take down: He had no idea that an armed off-duty police officer was among those on the pavement. Footage shows him falling backwards after being gunned down

The officer, who was at the school with her seven-year-old daughter for a Mother's Day party, could be seen throwing away her bag as she approached the wounded assailant with her gun aimed at his body

Armed response: Officer Sastre ordered the suspect to turn over and pushed him with her foot into a facedown position

Pointing the firearm at the school's security guard and reaching out to grab the man's wallet and phone, the suspect 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, pictured, is a mother to two girls, aged seven and two, and is married to a police lieutenant

Sastre, who had gone to the event with her seven-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 valor 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.'

Governor França commended Sastre saying she had shown 'dexterity, technique and courage.'

Officer Sastre, who has two daughters, was presented with flowers by Sao Paulo Governor Márcio França, pictured second right, on Sunday - Mother's Day in Brazil

Katia da Silva Sastre, 42, pictured left, is honored for her actions after rounding on a gunman who threatened to shoot outside a school in Sao Paulo, Brazil, on Saturday

Speaking of Officer Sastre's heroic act the Governor said: 'Her courage and precision saved mothers and children, yesterday at the door of a school'

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 immobilizes 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.