Wildfires have raged across the US West, forcing thousands to flee their homes during a sweltering, smoke-shrouded holiday weekend of record heat. However, drizzle and easing temperatures have helped more than 1,000 firefighters to gain the upper hand in battling the La Tuna fire – the largest in Los Angeles history.

Officials warn that danger remains: "We've turned the corner, but this is not over," Los Angeles Mayor Eric Garcetti told reporters. "With winds this strong, anything can happen." Shifting winds could cause burning embers to spread the fire once more through the rugged northern edge of Los Angeles, he said.

The wildfire is the largest in terms of acreage in the city's history, Garcetti said. It was considered 30 percent contained by late Sunday night, up from 10 percent Sunday morning. The nearly 5,900-acre (2400-hectare) La Tuna Fire, named after the canyon area where it erupted, has destroyed three homes and damaged one. More than 700 homes were evacuated as the blaze tore through thick brush that has not burned in decades.

Temperatures in the area have hovered around 100 degrees Fahrenheit (38 degrees Celsius) in recent days. But the mercury was in the low 90s on Sunday, and the temperatures are expected to be moderate and the humidity higher in the coming days, positive signs for containing the fire, said Los Angeles Fire Chief Ralph Terrazas.

Fires caused evacuations in Glacier National Park in Montana and many other parts of the West; compelled crews to rescue about 140 hikers who had spent the night in the woods after fire broke out along the popular Columbia River Gorge Trail in Oregon; and led firefighters to step up efforts to protect a 2,700-year-old grove of giant sequoia encroached by flames near Yosemite National Park in California.

The high at Los Angeles International Airport reached 97 degrees Fahrenheit (36 degrees Celsius) on Sunday, topping the previous mark of 92 (33 Celsius), set in 1982. Records were also set in parts of Ventura and Santa Barbara counties, where the temperature hit 101 degrees (38 Celsius). San Francisco residents, meanwhile, stifled under a third day of a rare heat wave in the coastal city, with record highs in the San Francisco Bay Area in the 100s Fahrenheit (high 30s Celsius).