Dozens of D.C. firefighters were called to put out a fire burning across roof top decks of an apartment building in the 1300 block of 12th Street NW, D.C. There were no injuries, but at least eight families were displaced. (D.C. Fire Dept.)

More than 100 firefighters battled a fire that swept across several rooftop decks of an apartment house in Northwest Washington’s Logan Circle neighborhood on Tuesday afternoon. Three firefighters were tranported to a hospital, and 12 residents were displaced, D.C. Fire and EMS officials said in a tweet.

The fire broke out shortly before 4 p.m. — as temperatures in the District soared to 96 degrees — sending smoke and flames into the air above the third floor of the building in the 1300 block of 12th Street NW.

Firefighters pouring water from the top of aerial ladders extinguished the bulk of the fire by 4:45 p.m., but they continued at 5:15 p.m. to put out fire inside the building. Fire officials said some fire spread to an adjacent home. A firefighter twisted his ankle, officials said, and a dog was rescued and rushed to an emergency veterinarian clinic with serious injuries.

Two of the firefighters were taken to a hospital for heat-related reasons, the tweet said.

Spectators gather as firefighters work a two-alarm fire on the roof of a three-story apartment building in the 1300 block of 12 ST NW. (Peter Hermann/The Washington Post)

Several streets in the area were closed during the evening rush hour, including 13th Street between Logan Circle and M Street NW and 12th Street between M and N streets.

Vito Maggiolo, a spokesman for the fire department, said the fire started on the roof along decks, though the precise cause remains under investigation. He said flames hit a propane tank attached to a grill, causing it to explode as firefighters were training water on the flames. There are eight apartments in the building, and several have decks on the roof.

Linda Lee, who lives in a ground-floor apartment with her husband, said she heard popping sounds and saw flames reflected in a neighbor’s window.

“I just ran outside,” said Lee, standing with other displaced residents outside a corner store. “We’re all kind of upset. We just lost our home.”

A man who lived on the top floor said he also heard popping sounds and went up to the deck. “I saw a chair on fire and I got out of there,” said the man, who declined to give his name. Another occupant was outside without his shoes; another was sitting under a tree holding a cat.

Gregory M. Dean, chief of the D.C. Fire and Emergency Medical Services department, said the fire went to two alarms, drawing about 100 firefighters.

“It was due to the heavy smoke and fire,” Dean said, as well as the heat, which forced commanders to frequently rotate firefighters in and out of service to avoid over-exertion.

Maggiolo said the building’s roof and third floor were badly damaged by the fire. The other floors had extensive water and some water damage, he said. It was not immediately clear whether any of the occupants could return there on Tuesday.

Jason Samenow contributed to this report.