A plainclothes cop came within inches of dying when he was shot in the head Tuesday night during a gun battle inside a Brooklyn public housing project. Click below to find out more.

@WiLMajor

Officer Kevin Brennan, 29, assigned to the Brooklyn North Anti-Crime Unit, was hit in the back of the head around 9 p.m. by a bullet that lodged behind his right ear. He is in critical but stable condition at Bellevue Hospital.

“He’s one lucky young man,” said Police Commissioner Raymond Kelly, holding a jar containing the bloody bullet that doctors had been able to remove. “It’s a miracle. He’s very very lucky.”

Brennan lives in Garden City, L.I., with his wife Janet and 6-week-old baby daughter, Maeve.

“Thankfully tonight I think there’s no reason to think her Daddy won’t be there to see her crawl for the first time and in good time dance at her wedding,” said Mayor Bloomberg, who joined Kelly at Bellevue.

Police arrested the suspected shooter, Luis (Baby) Ortiz, 21, at 390 Bushwick Ave. – where he was hiding inside his uncle’s apartment – about three hours after the shooting.

The Bushwick shootout began when Brennan, officers Michael Burbridge and Christopher Mastoros – responding to a call of a man with a gun – confronted Ortiz and two other men at 140 Moore St. in the Bushwick Houses.

The cops recognized Ortiz from a previous arrest, police said, and gave chase with Brennan in the lead as the suspect fled out the back of the building into 370 Bushwick Ave., police said.

Brennan followed Ortiz into the building, and the door closed behind him, trapping him in the hallway with the shooter, according to police. Ortiz pumped off one round, striking Brennan who returned fire, police said.

The suspect then fled into the housing project. Witnesses said Brennan appeared badly wounded.

“The hurt cop kept yelling ‘I got hit! I got hit!’” said Jenny Rios, weeping. “He was bleeding from the mouth.”

Before the arrest, hundreds of cops swarmed the area with dogs and helicopters looking for the suspect. He was eventually found sitting on a bed in the back of his uncle’s apartment and was arrested without incident.

A revolver with a black wooden handle that cops believe is the weapon used to shoot the cop was found on the ground outside the uncle’s fifth-floor apartment.

Cops said the perp is well known to the department. Kelly said he was wanted for the New Year’s Day murder of Shannon McKinney, 34, in front of a supermarket at the corner of Seigel St and Humboldt St. in East Williamsburg.

Ortiz has two dozen arrests, mostly for drugs, police said.

Residents of the Bushwick Houses said Ortiz is a dangerous man.

“He’s a bad dude. Everyone knows him around here ,” said a 52-year-old Bushwick Houses resident of the alleged perp.

Brennan,who joined the department in 2005, was woozy Tuesday night, Kelly said.

“He’s in a lot of pain. He’s moving his arms and legs. He’s having trouble with his vision,” said Lt. Christopher Devaney, Brennan’s partner.

“He’s one of the best, so I picked him to ride with me,” added Devaney, who said Brennan had been working at the 90th Precinct for three years.

The mayor said the officer is conscious but sore after the shooting and credited divine intervention for saving the officer’s life.

“He understands he was hit – he said he was in a lot of pain,” said Bloomberg. “God in this case was kind. It could have turned out an awful lot worse.”
DN