More than 1000 people packed an Arizona university gym to honour the bravery and sacrifice of 19 elite firefighters who died battling a massive wildfire.

Those in the crowd rocked children in their arms, wiped away tears and applauded after each set of remarks, often rising to their feet.

Prescott Fire Chief Dan Fraijo, spoke in a shaky voice and paused frequently.

He, said the firefighters' families, the Prescott Fire Department, the city of Prescott, the state of Arizona and the nation had all lost.

At the end of the ceremony, dozens of firefighters sporting Hotshot shirts and uniforms from other jurisdictions towns marched to the front of the auditorium and bowed their heads for a moment of silence in memory of their fallen comrades.

The Prescott firefighters were trapped by the raging wildfire and unfurled their foil-lined, heat-resistant tarpaulins and rushed to cover themselves on the ground.

But that desperate line of defence but even that could not save them from the flames that swept over them.

It was America's biggest loss of firefighters in a wildfire in 80 years.

Sunday's tragedy all but wiped out the 20-member Granite Mountain Hotshots, a unit based at Prescott, authorities said, as the last of the bodies were retrieved from the mountain in the town of Yarnell. Only one member survived because he was moving the unit's fire engine at the time.

The deaths plunged the two small towns into mourning as the wildfire continued to threaten Yarnell.

Arizona's governor called it "as dark a day as I can remember" and ordered flags flown at half-mast.

In a heartbreaking sight, a long line of white vans carried the bodies to Phoenix for post-mortem tests.

The lightning-sparked fire - which spread to 13 square miles by yesterday morning - destroyed about 50 homes and threatened 250 others in and around Yarnell, a town of 700 people in the mountains about 85 miles north west of Phoenix.

About 200 more firefighters joined the battle, bringing the total to 400. Among them were several other Hotshot teams, elite groups of firefighters sent in from around the country to battle wildfires.

Residents huddled in shelters and restaurants, watching their homes burn on TV as flames lit up the night sky in the forest above the town.

It was unclear exactly how the firefighters became trapped, and state officials were investigating.

Prescott City councilman Len Scamardo said the wind changed directions and brought 40-50mph gusts, trapping that caused the firefighters to become trapped at around 3pm on Sunday.

The blaze grew from 200 acres to about 2,000 in a matter of hours.

Southwest incident team leader Clay Templin said the crew and its commanders were following safety protocols and it appeared the fire's erratic nature simply overwhelmed them.

The Hotshot team had spent recent weeks fighting fires in New Mexico and Prescott before being called to Yarnell,.

Fire Chief Freijo said: "When we talk about deploying the shelters, that's an automatic fear, absolutely.

"That's a last-ditch effort to save yourself when you deploy your shelter."

Arizona Forestry Division spokesman Mike Reichling said all 19 victims had deployed their emergency shelters as they were trained to do.When there is no way out, firefighters are supposed to step into them, lie face down on the ground and pull the fire-resistant fabric completely over themselves. The shelter is designed to reflect heat and trap cool breathable air inside for a few minutes while a wildfire burns over a person.

But its success depends on firefighters being in a cleared area away from fuels and not in the direct path of a raging inferno of heat and hot gases.

The glue holding the layers of the shelter together begins to come apart at about 500 degrees, well above the 300 degrees that would almost immediately kill a person.

President Barack Obama offered his administration's help in investigating the tragedy and predicted it would force government leaders to answer broader questions about how they handle increasingly destructive and deadly wildfires.

He said: "We are heartbroken about what happened."

The nation has 110 Hotshot crews, according to the US Forest Service website. They typically have about 20 members each and go through specialised training.