Police in the Queens

The New York City police officer who was shot in the face and chest while on duty two days ago died Monday, officials confirmed.

The officer, Brian Moore, was the first police officer killed in the line of duty since December, when two uniformed New York City police officers were ambushed in Brooklyn, also a borough of New York City.

Moore was shot when he and his fellow officer Erik Jansen sat in an unmarked car in a residential neighborhood in Queens, one of New York City's five boroughs. The officers were reportedly trying to question a black man in his 30s, after they saw him adjust an object in his waistband.

The suspect, identified as Demetrius Blackwell, pulled out a gun and fired several times into the vehicle. The two officers did not have a chance to get out of the car or return fire. Moore was seriously injured and rushed to the hospital, according to police sources.

Blackwell, 35, who was later captured and taken into police custody, was prosecuted Sunday with two counts of charges including first-degree attempted murder. He had a history of extensive arrests.

Moore came from a family of police officers -- both his father and uncle were both retired as sergeants with the New York Police Department, according to New York City Mayor Bill De Blasio.

Mayor de Blasio conveyed his condolences to the family of Moore.

"Our hearts are heavy today as we mourn the loss of Police Officer Brian Moore," said Mayor De Blasio in a statement, praising Moore for his brave service and devotion to the job.

"For five years, Brian served with distinction and he put his life on the line each day to keep us all safe," said the mayor. " During this tragic time, New Yorkers must come together to support the Moore family in any way we can."