A three-alarm fire raged through a Northwest Washington apartment building Saturday as residents jumped from windows and firefighters used ladders to rescue people who were trapped, fire officials said.

Scores of residents, some crawling on their hands and knees to avoid the smoke, fled through the darkened corridors of the four-story Rolling Terrace apartment complex, in the 1300 block of Peabody Street.

One occupant and five firefighters were taken to a hospital, and four residents were evaluated at the scene, officials said. The injuries were not believed to be life-threatening.

About 200 residents were displaced from the 55-unit brick complex.

“We had people hanging out of windows when we got here,” D.C. Fire Chief Gregory Dean said.

“A number of rescues happened at that time. . . . A couple people from the second floor jumped. Firefighters were able to catch them.”

“We had a pretty chaotic scene for life safety, while at the same time we had heavy fire,” he said at the scene Saturday morning.

Fire department video showed firefighters clambering down ladders, clutching rescued children in their arms and then climbing back up for more.

At one point during the night, they had to work in a drenching rain, officials said.

Dean said he believed that everyone had been safely evacuated.

Mayor Muriel E. Bowser (D) visited the scene later Saturday, praising firefighters and saying that the blaze was the worst she’d seen in Ward 4 in 10 years.

“The fact that we’re here talking about property damage and not loss of life is just a remarkable testament to our first responders,” she said.

Firefighters spray water on a fire at an apartment building at the 1300 block of Peabody Street Northwest that displaced more than 100 people in Washington, D.C. (Salwan Georges/The Washington Post)

The blaze was first reported around 3 a.m., and heavy smoke and some flames were still billowing from the site at 9 a.m.

Dean said firefighters conducted at least two searches of the building and found no one inside. But he said the firefighters had “zero visibility” during those searches.

The fire quickly grew unsafe, Dean said, and officials ordered that the blaze be fought from the outside.

“We took a couple of shots at it but had to go to the defensive to not put more people in harm’s way,” Dean said.

Fire officials said that at least a dozen people were rescued by ladders or evacuated through the stairwells and hallways, which were inundated by thick smoke.

“You had to feel the wall to get out, the smoke was so thick,” said Betty Derry, 80, who escaped in her nightclothes with her husband, Willard, 85.

Some had time only to throw on a pair of pants, grab a wife or child and get out. Everything was left behind. One man fled without his dentures.

David Chavez, 50, was awakened by the building’s fire alarm and had just enough time to rouse his pregnant wife, Yenis, 35; his son Omar, 12; and his brother-in-law and rush into a smoke-filled third-floor corridor.

As Chavez spoke inside a nearby Red Cross shelter Saturday, his wife, looking tearful and shaken, sat nearby, being comforted by another woman.

Captain Mike White watches and directs his firefighters at the scene of a fire at the 1300 block of Peabody Street Northwest in Washington. (Salwan Georges/The Washington Post)

As the alarm rang, Chavez pulled on his work pants, T-shirt and sandals. “That’s all I got,” he said.

“The rest, we lost everything.” As the family fled through the smoke, he said, Chavez became separated from Omar.

“Oh my God,” he said he thought. “This is the end of my life. But thank God, he was already outside when I got out.”

Another resident, Edgar Rodriguez, 14, said he could barely see his mother, Anabel Rubio, 41, beside him as they entered a smoke-filled corridor. So they held hands and felt their way along the walls until they found an exit.

Once outside, Edgar saw people trying to escape through the windows. He watched as firefighters rescued a neighbor’s baby.

“Firefighters got the baby from the window,” he said Saturday morning as he sat with his mother in the shelter. “The officer gave us a baby, our neighbor’s kid, so we carried the baby.”

Keyona Gardner, 30, knew she needed to get herself, her 5-year-old daughter and her mother out of their apartment when she detected a smell similar to burning electrical wire.

Her daughter, Phoenix Wright, had fire drills in school, so she knew to put on her shoes. She also grabbed her favorite stuffed animal, a pink bunny rabbit that played the song “Cheerleader” when she pressed its paw.

Gardner’s mother has lived in a third-floor apartment in the building for 37 years and was too distraught on Saturday to talk about the fire.

Gardner, speaking through tears, rattled off everything they lost: clothes, shoes, birth certificates, Social Security cards.

She said her daughter goes to gymnastics class on Mondays and starts swimming lessons next week but no longer has anything to wear.

When the 5-year-old asked about clothes, Gardner told her, “That’s all we have baby, our pj’s.”

As tears ran down Gardner’s cheeks, her daughter tried to wipe them for her and then wrapped her arms around her mother.

“I don’t know what’s going on,” Gardner said outside the shelter. “I’m trying to figure out what me and my kid are going to do, where we’re going to go.”

More than 100 firefighters had been called to the scene. Personnel from rescue squads 1 and 2 and Engine Company 21 entered the blast doors of the building’s lobby.

They were met by black, tarry smoke and dozens of desperate residents.

“You probably couldn’t see more than a half-inch in front of your nose,” Capt. Ed Kauffman said.

Rescuers inside the building used their masks to give at least two people oxygen as they escorted them from the third floor to safety, fire officials said.

The building has three wings that form a C-shape, and all of the wings suffered damage to the top floor, the attic spaces and the roof.

More than three hours after the fire was reported, ladder trucks continued to pour thousands of gallons onto the top of the building, but flames continued to shoot through windows and through the top of the structure. Acrid smoke could be smelled more than a mile away.

Electricity and water service had to be shut off in the area, Dean said.

Fire officials estimated that they would continue operations for many hours Saturday, if not for days.

Officials said this fire posed a great danger, as the building was filled during sleeping hours with hundreds of people occupying dozens of units.

Dean, noting the apparent lack of serious injuries, praised the rescuers.

“Anytime you can take people out of harm’s way, that’s why we’re here,” he said. “It’s incredible. Those guys did a great job.”

The Red Cross said donations can be made to its Disaster Relief fund, at wapo.st/donations.

Saturday morning, as firefighters hosed down the smoking complex, the roof was gone, revealing charred timbers, and an incinerated plant sat in a flowerpot on the sill of a burned-out, third-floor window.