An off-duty, police officer and Marine veteran with a couple of combat tours in Iraq and Afghanistan under his belt-- is recovering after being wounded in a wild shootout early Sunday University Heights.

Police say Officer Nelson Vergara, 36, was on the way home from work, when the liquored-up suspects confronted him around 4:45 a.m. at the corner of Phelan Place and West Tremont Avenue. He'd just ended his shift, which included taking part in an NYPD anti-terrorism exercise.

According a Daily News report, the men were cursing at Vergara from across the street before one of them tossed a bottle of beer his way. "The glass bottle shattered when it hit the ground," NYPD Commissioner Raymond Kelly said. "Fragments from the bottle struck the officer," he explained.

As the combat vet was crossing the street and identifying himself as a cop, investigators say a man in a green Honda pulled up, got out of the car and fired several shots at the bottle thrower. The bullets were flying. Still, Vergara was able to get off 11 shots at the trigger man, the driver of the Honda, who returned fire, while he was busy spraying the group of drunks nearby, according to authorities.

Vergara was struck twice -- once in the left shoulder and once in the right shin -- but managed to cuff the bottle thrower, who was also injured.

"There was obviously some sort of issue between the shooter and at least one person in that group," Kelly said, adding.... "Vergara was caught in the middle."

The married father of two daughters was rushed to St. Barnabas Medical Center, where doctors list him in stable condition.

Meanwhile, police say the 20-something-year-old gunman was shot several times. He fled the scene in the Honda and also wound up at St. Barnabas, where cops arrested him. He, too, is listed in stable condition.

As for the 22-year-old bottle thrower, the guy who reportedly started the whole mess -- he took a bullet to the hip. He was taken to Bronx-Lebanon Hospital, where he was also arrested. He's also in stable condition.

The five other men involved in the melee are reportedly being questioned by police, who say the eight casings found at the scene did not come from Officer Vergara's gun.