Wildfires possibly sparked by fallen power lines roared across a swath of western Australia on Wednesday, razing almost 40 homes and sending hundreds of people fleeing for their lives, officials and witnesses said. At least three people were injured.

Two major blazes burned out of control overnight after breaking out Tuesday afternoon in a wheat and sheep farming district north of the coastal city of Perth, forcing the evacuation of the township of Toodyay and threatening a second town, Badgingarra, farther north.

The two fires scorched a combined total of more than 33,000 acres of forest and farmland before cooler conditions on Wednesday helped hundreds of firefighters contain them.

Western Australia state Premier Colin Barnett declared a natural disaster — freeing up emergency funds for survivors — and praised authorities who battled the blazes.

"There is no doubt they saved lives last night," Barnett said Wednesday after visiting burned-out homes in Toodyay. "If you saw the destruction, houses were totally destroyed and people were got to safety by the emergency services."

The state Fire and Emergency Services Authority said at least 37 houses had been razed.

Two firefighters were treated for smoke inhalation and a third was treated for a heat-related illness. Farmers also reported stock being killed. The extent of the damage was still being assessed, said emergency authority spokesman Allen Gale.

Police say falling power lines likely sparked the Toodyay blaze, since there were no other ignition sources in the area.

The managing director of Western Power, Doug Aberle, told Australian Broadcasting Corp. that an independent investigator would head to the scene on Saturday.

"If it's determined that it's caused by our negligence, we will be paying compensation as appropriately determined, as we always do," he said, expressing his sympathy to the victims.

Wildfires are common across Australian during the summer months, but they rarely claim so many homes.

In February, Australia experienced its worst wildfire disaster on record when hundreds of blazes raced across huge parts of southeastern Victoria state, killing 173 people and destroying more than 2,000 homes in a single day.