An Afghanistan vet and double amputee became a local hero in New York City earlier this week when he rescued a baby from a smoking car.

Matias Ferreira, a former Marine who lost both his legs to an improvised explosive device while serving in Afghanistan, was just two days away from getting married to his sweetheart when he heard a frantic mother crying for help on a busy road in Queens.

The mother was trapped in her driver’s seat after her car plowed into a median pole and needed to get her child out of the smoking car.

Thinking of his own 11-month-old daughter, the 26-year-old Ferreira jumped out of his pick-up truck and sprinted over – on two prosthetic legs – to the car.

"With the Marines, you are taught to be prepared and act," Ferreira, who was leaving his wedding rehearsal at St. Mary Gate of Heaven Parish when he heard the screams, told the New York Daily News.

He added: "Instinctively you just react, you don’t freeze, and thankfully we were able to make a difference."

While his brother and future father-in-law helped free the frantic mother, Ferreira squeezed himself into the backseat of the car and rescued the baby from her car seat.

"We didn’t know if the car was on fire or anything else," the Uruguayan-born marine said. "We knew we had to get them to safety."

The three men stayed on the scene until firefighters and paramedics arrived on scene.

"I didn’t hear the baby crying, so I got kind of concerned," Ferreira added. "Then I saw her open her eyes, and it kind of reassured me she was doing better."

Ferreira lost both legs from the knees down and broke his pelvis in January 2011 when he stepped on an IED while fighting the Taliban in Afghanistan. Despite his injuries, he still competes in sports and rides a motorcycle.

"The prostheses were the last thing on my mind," Ferreira said of the rescue. "It doesn’t have to be a Marine. It doesn’t have to be a firefighter. It just has to be someone with a good heart."