This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

CROWN HEIGHTS, Brooklyn — An NYPD officer was shot in the back in Brooklyn on Christmas Eve when he responded to a 911 call for a domestic dispute, police said.

The alleged shooter was arrested and the gun was recovered, police said. A bulletproof vest protected the 27-year-old officer, who was rushed to a local hospital after being shot near Prospect Place and Ralph Avenue. It went into the vest, but didn’t penetrate the officer’s skin, NYPD Commissioner Dermot Shea said.

The shooter allegedly threatened his girlfriend, Mayor Bill de Blasio said.

The girlfriend’s mother repeatedly called 911, begging for police to come, Shea said. She said the boyfriend had threatened to shoot their home up. As officers on scene interviewed the daughter, her boyfriend arrived.

He shot an officer and then ran, Shea said. Other officers pursued and arrested him a few blocks away. Body camera video shows officers repeatedly tell the shooter to drop his gun. The suspect, who police sources identified as 20-year-old William Moss, put it down on the sidewalk and was taken into custody.

“Because the NYPD was there, that woman is alive right now,” de Blasio said. “Because our officer put himself in harm’s way, an innocent woman is alive.”

The officer’s precise condition wasn’t immediately clear, but police officials said the officer was awake and responsive and has since been released from the hospital.

De Blasio and Shea spoke to the officer’s parents.

“They felt that this was a Christmas miracle that their son was alive and well,” de Blasio said.

The NYPD asked people to avoid the area. People were advised to expect a police presence in the area.

“It’s Christmas Eve. This is a time when you would expect peace, you would expect harmony,” de Blasio said.

PIX11’s Anthony DiLorenzo contributed to this report.