Firefighters responded to the fire in the 1600 block of West Foster Avenue shortly before 2 a.m. and were told someone was trapped on the first floor, officials said.

Two of the first firefighters on the scene crawled through smoke to a first-floor bedroom, where they found a man unconscious, Battalion Chief James O'Donnell said. The firefighters pulled the man to a front porch and performed CPR, O'Donnell said.

The man regained consciousness on the way to an ambulance and was taken to Weiss Memorial Hospital in fair-to-serious condition.

Residents of another unit in the building said the man's screams were the first indication something was wrong. Madison Graham, who like her two roommates had been asleep when the fire started, praised the firefighters' prompt response.

"I walked back to the front, trying to figure it out and was five seconds away from calling 9-1-1 when I heard the sirens and smelled the smoke," said Graham, 26. "They showed up right on time. I just started to smell smoke and they were there."

Graham and both her roommates left the building immediately and were not injured.

Before giving a brief interview across Foster from the fire, O'Donnell radioed Truck 12 and summoned the two firefighters who had brought the man to safety, asking them to stand next to him.

After 10 people were shot — seven of them in one incident — overnight in Baltimore following the city's most violent month in decades, police announced Sunday that 10 federal agents will embed with the city's homicide unit for the next two months.

Interim Baltimore Police Commissioner Kevin Davis announced a reorganization of the department in an email to police Saturday night, formally promoting or moving 28 people into new roles and undoing some changes made by his predecessor Anthony W. Batts.