Dennis Guerra, 38, had been in critical condition since the fire Sunday at an apartment building on Surf Avenue. He and a fellow officer, 36-year-old Rosa Rodriguez, took an elevator to the 13th floor to warn residents and help evacuate the building, but when they emerged from the elevator they were overcome by smoke.

Bratton: NYPD Has No Standard Protocol for Fire Scenes

The police commissioner says that needs to change in the wake of last weekend's Coney Island fire. Michael George reports. (Published Tuesday, Apr 8, 2014)

Both officers, who are members of the force's housing bureau, were found unconscious by firefighters. Guerra, a married father of four and seven-year NYPD veteran, died shortly before 7 a.m. Wednesday, police say.

Mayor de Blasio said Guerra was an exemplary officer who went to save people in need. He called him a good man and a brave officer, and vowed to stand by his family.

Top News Photos of the Week

"He went selflessly towards the flame, selflessly towards those who are in danger, no matter what the risk to him," de Blasio said. "It’s something that our police officers do every day. It’s something our first responders do every day. It is something we need to appreciate every day."

Guerra had two daughters, 20 and 14, and two sons, 17 and 7.

"The entire city grieves this terrible loss," Police Commissioner Bill Bratton said in a statement. "It is a startling reminder that what can appear to be a routine assignment can very quickly become deadly."

Rodriguez remains in critical condition at a hospital.

Teenager Marcell Dockery was arrested Monday on assault, reckless endangerment and arson charges in connection with the fire, which originated from a mattress in the building.

It's not clear if he has an attorney, nor was it known if he would face additional charges following Guerra's death.

Police say Dockery told detectives he lit the mattress on fire because he was bored. They say he said he tried to put out the fire and warn residents as the flames spread.

Five people suffered minor injuries, including two firefighters, authorities said.