NEW YORK (AP)  Police said a New York City officer was shot and wounded in Brooklyn on Thursday by a gunman who later took his own life.

Police Commissioner James O”Neill said at a news conference that two officers responded Thursday afternoon to a call about an emotionally disturbed 29-year-old man in an apartment in Brooklyn”s Cypress Hills neighborhood. When the officers entered, the man opened fire, striking one in the right arm as he entered a bedroom. Two other shots hit his bulletproof vest. He did not return fire.

The 30-year-old officer, who has been with the New York City Police Department for two years, was stable at Jamaica Hospital, O”Neill said.

The gunman barricaded himself in. Police were held at bay for hours, standing outside with their guns drawn.

When police stormed the apartment, they found him dead of a self-inflicted gunshot wound.

“What could have been just another day, just another call, turned into something much worse,” Mayor Bill de Blasio said during the news conference at the hospital. “This officer was definitely saved by his vest.”

The commissioner said the shooter”s mother had first called 911.

Neither the identity of the officer nor the shooter were immediately released.

De Blasio and O”Neill visited the officer at the hospital.