It happened in Sao Paulo, where two armed men in hooded sweatshirts stormed a pharmacy. Surveillance video showed the officer opened fire, shooting past a customer.
The man then checked the other side of the store and fired again. His wife was seen crouching down and taking the child from him.
The two suspects were pronounced dead at the scene.