The drama unfolded on Tuesday night in a leafy residential street in Campinas, Sao Paulo state, Brazil.
Street cameras show a man in shorts carrying a black rucksack strolling past the officer and his relatives.
The man then walks back towards the group and threatens the officer with a machine gun he has hidden in his bag.
The policeman reaches for his handgun as the criminal grabs at his arm to try to stop him before letting go of his baby, who falls to the ground.
There’s brief struggle and the officer fires at the robber as he attempts to flee.
The robber, a convicted drugs trafficker, checked into a hospital under a false name hours later with gunshot wounds.
He was later identified by the officer and remains under police guard, with his condition described as serious.
An alleged accomplice, who was sat in a black Honda car parked nearby and believed to be the getaway vehicle, was also arrested.