The bullet that struck Marcano grazed his left arm and entered his chest — just missing his heart — and fractured a rib. He was in stable condition last night at Bronx Lebanon Hospital, surrounded by family.

He was the 12th NYPD cop wounded this year. The violence came just one day after Nassau County Officer Arthur Lopez was killed in Queens.

Mayor Bloomberg met with Marcano — a transit officer in The Bronx — and said, “He’s a very lucky guy and he knows it.”

“He said he was in a little bit of pain but he’s certainly bright-eyed.”

The drama began at about 6:40 p.m. when Marcano was riding with his girlfriend and she noticed two thugs robbing a man of $80 on Harrison Avenue in University Heights, authorities said.

“Give me the money out your pockets!” one of the brutes barked at the unidentified victim, according to a witness.

Another mugger pistol-whipped the victim and shouted, “Give me whatever you got!” said the witness.

Marcano, who has been on the force since 2007, jumped out of his white Infiniti, flashed his badge and said he was a cop.

At least one of the suspects fired at him.

After Marcano was hit, the two punks hopped into a white Ford Mustang, with a driver waiting for them, and sped off.

Marcano got back into his car and his girlfriend frantically drove toward the hospital.

At Harrison and West Burnside avenues, she repeatedly honked the horn while stopped at a red light, cops said.

The suspects happened to be in front of them — and rolled into the intersection, striking a livery cab.

The cab struck another car and went up onto a sidewalk.

As the three suspects ran from the Mustang, Marcano recognized them and pursued them on foot.

While taking cover and yelling to passers-by to “Get down!” Marcano fired at the muggers, Kelly said.

“In a remarkable display of marksmanship and cool under fire, Officer Marcano fired, striking one of the suspects in the head,” Kelly said.

A witness, whose back was turned to the action, said he heard at least 10 shots. “It happened quickly. When I turned around, there was a dead guy lying on the ground under the car,” said Emilio Acevedo, 17.

Marcano then chased after another suspect, but was unable to catch him. The cop finally hopped into an ambulance and was rushed to the hospital.

Cops recovered a 380-caliber semiautomatic gun from the scene.

Marcano’s neighbors recalled how his father’s death on American Airlines Flight 587, which crashed in the Rockaways in 2001, spurred him to go into law enforcement.

“His mother did really good with those kids,” said a neighbor. “As a result of their dad dying in the plane crash, I think they all wanted to go into law enforcement.”

Marcano’s brother, Victor, who also works in law enforcement, said “I know he did a good thing” but didn’t want to say more because two suspects are still at large.