PHOENIX — Firefighters across Arizona and New Mexico battled 31 wildfires on Wednesday, their efforts complicated by a relentless heat wave and bone-dry conditions. And in the Angeles National Forest, on the northern edge of Los Angeles, two fires kept more than 300 families from their homes as the fires threatened to merge into one.

Other fires ignited in Colorado and Utah, threatening homes, closing roads and stoking the zero-sum competition for finite resources — firefighters and the airplanes and helicopters that dump chemicals and water.

Decisions about which areas will receive firefighting resources are revisited each morning, as team leaders assess how much ground the fires have gained, who or what is endangered, and how firefighters will transport tools, water and fuel for their chain saws.

It is like piecing together an ever-changing puzzle, “deciding where resources go, stay and will move in the next few hours,” said Jessica Gardetto, a spokeswoman for the National Interagency Fire Center in Boise, Idaho, the mother ship of wildfire management in the country.