Fireworks sit outside of a home that caught fire early Friday in the 800 block of Varnum Street NW. (D.C. fire department)

A house fire that left four people homeless in the District early Friday was caused by the improper use of fireworks, officials said. 

Authorities also pointed to fireworks in a separate incident in Virginia the same morning that left five people displaced after a house caught fire.

In the District, firefighters responded before 1 a.m. to a fire at a home in the 800 block of Varnum Street NW in the Petworth neighborhood. The fire spread inside the walls, and flames rose from the attic of the two-story, single-family home.

Firefighters battle a blaze early Friday in the 800 block of Varnum Street NW in the Petworth neighborhood. (D.C. fire department)

Officials said the fire, which also displaced several pets, was caused by the improper use of fireworks that were purchased illegally.

The fireworks, designed to launch into the air, were on the street outside of the house when firefighters arrived, officials said.

No injuries were reported. The Red Cross was requested to assist the four people who were displaced.

Fire department spokesman Vito Maggiolo said a description on one package of fireworks said it “shoots flaming balls.”

“These are airborne fireworks that have the chance of setting a house on fire,” he said. “That’s what happened.” 

The owner of the house declined to comment on the fire. No arrests were made.

D.C. police said officers have recovered thousands of illegal fireworks across the city, including 58,000 in one of the city’s seven police districts. Maggiolo said fire officials expected firework activity to continue through the weekend.

“People keep shooting until they’ve expended them all,” Maggiolo said.

In Fairfax County, fire officials said five people were displaced after a fire to a carport spread to a house about 1 a.m. Friday in the 4100 block of Watkins Trail in the county’s Annandale area.

Investigators determined the fire was accidental, caused by the improper disposal of fireworks. No one was injured in the blaze, and damage was estimated at more than $380,000.

About 180 people, on average, end up in emergency rooms each day during the month of July for fireworks-related injuries, according to the U.S. Fire Administration.

D.C. law prohibits fireworks “intended to move after the piece is placed and fired; such as bottle rockets, parachutes, buzzbombs, pinwheels, helicopters, jumping jacks,” according to the D.C. police website.

There were no arrests on Thursday related to illegal fireworks in the District, a D.C. police spokesman said.