A massive fire in Fairfax County that destroyed an unfinished development of homes and shops Saturday was accidental and caused by improperly discarded smoking materials, authorities said Thursday.

The four-alarm blaze resulted in more than $48.2 million in damage to two dozen homes, townhouses and apartment buildings, as well as to equipment and 29 vehicles at the construction site.

The fire broke out about 9:40 a.m. Saturday in the 2800 block of Poag Street inside the South Alex development. Firefighters arrived within three minutes of getting the initial call, officials said, and spent about four hours putting out the fire.

Fire department spokeswoman Ashley Hildebrandt said the fire was among the most damaging in the county’s history.

“We’ve had bigger ones in terms of number of alarms, but in terms of damage this is one of the largest,” she said.

Fairfax County fire officials gave no details on what type of smoking materials were involved or how they were wrongly discarded. A fire official at the scene Saturday said the blaze reached five alarms, but Hildebrandt said Thursday it topped out at four.

The building where the fire began was in the middle of several others being built. The buildings were under construction and didn’t have working sprinkler systems.

Wind added to the difficulty of fighting the fire. It spread to a row of townhouses under construction, as well as other buildings.

At one point, about 150 firefighters were involved in fighting the blaze, officials said. Other fire departments, including from Arlington and Prince George’s counties, and Alexandria and Fort Belvoir, responded to help.

Passersby posted dramatic videos on social media that showed flames in the windows of a five-story building.

A large column of smoke filled a mostly clear sky and was visible across much of the Washington area.

Two firefighters suffered minor injuries and were taken to hospitals, where they were treated and released, authorities said. One civilian was also hurt, Hildebrandt said.

Fire investigators said a worker at the construction site saw a fire in a trash chute and called 911. The worker also tried to put out the fire.

The construction site is one of several projects planned along struggling Richmond Highway, which is expected to be widened and receive bus rapid transit service.

The complex included plans for 400 condominiums, a coffee shop and grocery store. It was slated to open in the summer of 2021, according to a description on the project’s website.

Sri Velamati, president of Combined Partners, which was developing the project, said in a statement Saturday that the company plans to rebuild.

A message on the company’s website this week says it was “shocked and saddened” by the fire but will fulfill its “commitment to this neighborhood.”

The fire was the most damaging in recent memory in the county.

In 2000, a five-alarm fire destroyed four unfinished apartment buildings in a housing complex in Herndon. More than 100 firefighters worked to extinguish the blaze, and estimates at the time pegged the damage at between $3 million and $10 million.

In 1986, 13 buildings at the Lorton Correctional Complex, which housed inmates from the District, caught fire. Nearly 50 inmates, prison guards and firefighters were injured, and one inmate later died, according to the county fire department’s website.