KANSAS CITY, Mo. (AP) – Two firefighters who saved two residents from a burning apartment building in Kansas City were killed when the structure collapsed around them just minutes later, authorities said.

Fire Chief Paul Berardi said two other firefighters were injured Monday night as the massive fire engulfed the building on the city’s northeast side. Berardi lauded the bravery of the two firefighters who died.

"They did not die in vain," he told KSHB-TV. "They saved two civilians, carried them out of the second floor on ladders, before the wall collapsed."

The identities of those killed and hurt have not been released. The condition of the two injured firefighters was not clear early Tuesday.

Fire Department Battalion Chief James Garrett told the Kansas City Star (http://bit.ly/1jtHduK ) that the building was already heavily damaged when firefighters arrived. They were clearing an area where a roof had started to cave in about 7:30 p.m. when the building collapsed, Garrett said.

Berardi said at a news conference that firefighters were at a hospital consoling the families of those who died.

"Our hearts absolutely go out to the families, both to their peers who are grieving but also to their family members who are at the hospital with them now," he said.

"The fire department family will help the families through. It will be a difficult month. This is the worst day," Berardi said.

The cause of the fire was not immediately clear. An investigation was ongoing.

On resident who escaped the flames told The Kansas City Star that he was at home when he heard shouts to evacuate.

"I was laying down and heard somebody yell, ‘Everybody get out,’" Lee said. "I opened my door and there was smoke really bad."

A smoke alarm sounded, he said, adding that he was choking as he fled outside to safety.

Mayor Sly James said he was praying for the firefighters.

"Tonight’s tragic loss is a reminder that Kansas City firefighters put their lives on the line for all of us every day," James said in a statement. "Our condolences go out to the loved ones of those who made the ultimate sacrifice today."

Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

Join our Newsletter for the latest news right to your inbox