Most residents who left their homes to escape the fumes from a fire at a hazardous materials plant began returning Saturday, two nights after officials urged 17,000 people to evacuate.

Firefighters extinguished the blaze at EQ Industrial Services at 12:22 a.m., Apex Fire Chief Mark Haraway said. About 90 percent of evacuated residents were allowed to return at 9 a.m.

"We've been given every assurance that it's safe for our citizens to go back home," Mayor Keith Weatherly said.

Those who live in the area immediately surrounding what is left of EQ Industrial Services had to wait for pending environmental testing, with results expected later Saturday.

Firefighters used heavy machinery to pull away the twisted metal that had been guarding the heart of the smoldering fire, fed by industrial wastes including paints, solvents, pesticides and weed killer. It released a plume of thick black smoke and a yellow cloud of gas after it started late Thursday with a series of thundering explosions that lit up the night sky.

Firefighters mostly let the fire burn until it ran out of fuel.

"It's the best thing for the environment and the best thing for the community," Haraway said.

Worried officials had closed downtown Apex, canceled school on Friday and urged more than 17,000 people to leave their homes, but it wasn't known how many complied.

"With the hazardous materials, you really don't want to take a risk, especially with small children," said Shane McDonnell, who was back home after spending two nights with his wife and four kids — ages 13, 12, 8, and 3 — at an Embassy Suites in nearby Cary. "You don't want anything getting into their respiratory system at an early age."

There were no reports of serious injuries caused by the fire or the chemical haze it produced. Officials said 44 people went to emergency rooms, most complaining of breathing problems, but nearly all had been released by midday Friday.

Shelters took in several hundred people after the fire started late Thursday, but just 30 remained Friday night when EQ Industrial officials offered to send them to hotels. All but five people accepted the offer.

"We were very lucky that we had family close by," said Denise Arthurs as she unloaded her car Saturday morning. She and her husband aren't concerned about any lingering effects, she said.

"If we were closer, that would be troublesome," Arthurs said.

Haraway said Saturday that officials still do not know what sparked the fire. Officials from the Environmental Protection Agency were testing on site, and a team from the U.S. Chemical Safety Board was expected to arrive later in the day.

"Because of the many different types of waste that we bring in, it's very difficult to determine the cause of the fire," EQ spokesman Robert Doyle said.

State Department of Environment and Natural Resources officials said Friday their tests "had not detected anything out of the ordinary in the air." The state also determined that water supplies downstream from the fire appeared to be safe.

Onsite tests did not indicate immediate or long-term risks for Apex residents, said Rick Lowe, the Wake County environmental services director. Local, state and federal officials will continue to monitor the site for hazards to the air and water, he said.

A team from the U.S. Chemical Safety Board was also expected to arrive later in the day.

The company will be responsible for the cleanup, Haraway said.

Also Friday, two Apex residents filed suit in state court against EQ, seeking damages for the loss of use and enjoyment of their property. The suit, which seeks class-action status, also asks for punitive damages and an order directing EQ to pay for environmental and medical testing.

In March, the state fined EQ $32,000 for six violations at the plant, including failing to take steps to "minimize the possibility of a sudden or non-sudden release of hazardous waste ... which could threaten human health or the environment."

Doyle cautioned the violations might not have had anything to do with the fire, and the state said the company had passed a required inspection as recently as Sept. 28-29.

Last year, a similar fire at one of the company's plants in Romulus, Mich., drove about 2,000 people from their homes and sent at least 32 people to hospitals for treatment.

An investigation is still active, said Robert McCann, a spokesman for the Michigan Department of Environmental Quality. He said in an e-mail that extensive damage from the fire had made it difficult to determine a cause and whether there were any violations at the plant.