A District police officer was recovering from surgery Saturday after being shot three times by a 15-year-old boy at a home in Northeast, police said.

D.C. Police Chief Cathy L. Lanier said the 27-year-old officer, whom she declined to name, was in good condition after being shot in the neck, shoulder and chest about 5:10 a.m. outside a home in the 700 block of Crittenden Street NE. The officer’s protective vest stopped the bullet to his chest, she said.

“He’s in pretty good spirits, considering,” Lanier told reporters at a briefing Saturday afternoon.

Lanier said that one or two officers fired at the teenager but that he was not hit. The teen ran off but was arrested about 20 minutes later, after officers found him hiding under a nearby porch, she said. His name was not released because he is a juvenile. Officers also found a gun under the porch, police said.

Police initially responded to a 911 call of a disturbance at the home, but two more calls received while officers were en route changed the report to a man with a gun, Lanier said. As officers entered the back yard, Lanier said, the teenager “ambushed” them by shooting from a second-floor roof. A police news release described the teen as shooting from a porch, saying the youth ignored officers’ orders to drop the gun.

Lanier said the teen was treated for a “very minor” cut, although she did not elaborate on how or where he was hurt. He was charged with armed assault with intent to kill.