(Reuters) - About two dozen people and firefighters were injured on Wednesday in an explosion and fire that erupted at an apartment building north of Washington D.C., a spokesman for the fire services said.

The explosion shortly before midnight rocked Silver Spring, Maryland, and the fire burned into Thursday morning, Pete Piringer, a spokesman for the Montgomery County Fire and Rescue Service, said on a voice recording.

Authorities were investigating the cause of the explosion at the four-story building, which displaced about 90 people.

Piringer tweeted that about two dozen people, including firefighters, were injured. It is unclear if there are fatalities, and five to seven people remained unaccounted for, local media reported.

The Montgomery County Fire and Rescue Service said the fire was under control.

Silver Spring, Maryland is about 6 miles (10 km) north of Washington D.C.