SONOMA, Calif. -- Teams with cadaver dogs began a grim search Thursday for more dead in parts of California wine country devastated by wildfires, resorting in some cases to serial numbers stamped on medical implants to identify remains that turned up in the charred ruins.
RELATED: California wildfires bring record 31 deaths
New deaths confirmed Thursday took the toll to 31, making this the deadliest week of wildfires in California history.
Many of the flames still burned out of control, and the fires grew to more than 300 square miles (777 square kilometers), an area as large as New York City.
Sonoma and Napa counties endured a fourth day of choking smoke while many residents fled to shelters or camped out on beaches to await word on their homes and loved ones.
A forecast for gusty winds and dry air threatened to fan the fires further.
Some of the state's most historic tourist sites, including Sonoma city and Calistoga in Napa Valley, were ghost towns populated only by fire crews trying to stop the advancing infernos.
Calistoga, known for wine tastings and hot springs, had dozens of firefighters staged at street corners. Ash rained down from the sky and a thick haze covered the ground. Mayor Chris Canning warned that the fires were drawing closer and all of the city's 5,000 residents needed to heed an evacuation order.
RELATED: 10 victims identified in deadly North Bay fires
"This is a mandatory evacuation. Your presence in Calistoga is not welcome if you are not a first responder," Canning said during a news briefing, explaining that firefighters needed to focus on the blazes and had no time to save people.
A few residents left behind cookies for fire crews with signs reading, "Please save our home!"
Sonoma County Sheriff Robert Giordano said officials were still investigating hundreds of reports of missing people and that recovery teams would begin conducting "targeted searches" for specific residents at their last known addresses.
"We have found bodies almost completely intact, and we have found bodies that were nothing more than ash and bones," the sheriff said.
Some remains have been identified using medical devices uncovered in the scorched heaps that were once homes. Metal implants, such as artificial hips, have ID numbers that helped put names to victims, he said.
The eight new deaths confirmed Thursday brought the total to 31. Most of the fires, and the deaths, were in the coastal region north of San Francisco that encompasses wine country. Four deaths came further inland in Yuba County.
LIST: North Bay fire evacuation orders, people, animal shelters
While the Oakland Hills fire of 1991 killed 25 people by itself and the Griffith Park fire in Los Angeles in 1933 killed 29, never in recorded state history have so many people been killed by a simultaneous series of fires, said Daniel Berlant, a deputy director with the California Department of Forestry and Fire Protection.
Firefighters had reported modest gains against the blazes, but containment seemed nowhere in sight.
"We are not out of this emergency. We are not even close to being out of this emergency," Emergency Operations Director Mark Ghilarducci told a news conference.
More than 8,000 firefighters were battling the blazes, and more manpower and equipment was pouring in from around the country and from as far away as Australia, officials said.
Since igniting Sunday in spots across eight counties, the fires have transformed many neighborhoods into wastelands. At least 3,500 homes and businesses have been destroyed and an estimated 25,000 people forced to flee.
The wildfires continued to grow in size. A total count of 22 fires on Wednesday fell to 21 on Thursday because two large fires merged, said state Fire Chief Ken Pimlott.
The challenge of fighting the fires was compounded by the need for more help and the growing fatigue of firefighters who have been working for days.
"We have people that have been on that fire for three days who don't want to leave," said Cal Fire's deputy incident commander in Napa, Barry Biermann. "At some point, you hit a road block."
Fire officials were investigating whether downed power lines or other utility failures could have sparked the fires. It's unclear if downed lines and live wires resulted from the fires or started them, said Janet Upton, a spokeswoman for Cal Fire.
RELATED: How to help North Bay fire victims
Hundreds of evacuees fled to beaches far to the north of the fires, some sleeping on the sand on the first night of the blazes.
Since then, authorities have brought tents and sleeping bags and opened public buildings and restaurants to house people seeking refuge in the safety and clean air of the coastal community of Bodega Bay.
Local charities and residents went to Costco to buy supplies for the fleeing families. California Highway Patrol Officer Quintin Shawk took relatives and other evacuees into his home and office, as did many others.
"It's like a refugee camp," at his office, Shawk said.
Community members fed breakfast to some 200 people on the beach alone, and Patricia Ginochio, who owns a restaurant, opened the eatery for 300 more to sleep, she said. The evacuees' arrival was heralded by a long line of headlights heading to beaches.
"The kids were scared," Ginochio said, adding that temperatures by the beach drop dramatically at night. "They were shivering and freezing."
Some lucky evacuees returned to find what they least expected.
Anna Brooner was prepared to find rubble and ashes after fleeing Santa Rosa's devastated Coffey Park neighborhood.
Then she got a call from a friend: "You're not going to believe this." Her home was one of only a handful still standing.
"I swore when I left I was never coming back to this place," Brooner said. "I feel so bad for all the other people. All of us came back thinking we had nothing left."
Click here for complete coverage of the North Bay wildfires.