A former Marine, who lost both his legs after he stepped on an improvised explosive device while fighting the Taliban in Afghanistan back in 2011, saved a mother and a baby stuck inside a smoking car Wednesday.

Matias Ferreira, 26, was with his brother and father-in-law driving around Queens in New York City when they encountered a car accident with a woman trapped inside it and screaming for help, according to People.

The woman repeatedly yelled "my baby, my baby," and Ferreira, despite wearing prosthetic legs below both his knees, ran towards the car and climbed on its back seat to release her baby from the car seat. His brother and father-in-law, meanwhile, pulled out the baby's mother out of the car wreck.

Posted by Matias Ferreira on Saturday, October 10, 2015

The three men had left St. Mary Gate of Heaven Parish Church, where Ferreira took part in a rehearsal for his second wedding to his wife Tiffany that took place on Friday. They first got married at a small ceremony in 2014, the Daily Mail reported.

"With the Marines, you are taught to be prepared and act," Ferreira explained in an interview with the New York Daily News. "Instinctively you just react, you don't freeze, and thankfully we were able to make a difference."