(Updates containment, evacuation numbers)
By Laura Zuckerman
SALMON, Idaho, Aug 20 (Reuters) - Firefighters gained ground on a wildfire threatening the ski resort town of Sun Valley, Idaho on Tuesday as evacuation orders were lifted for hundreds of homes and officials said they had "turned the tide" against the wind-whipped blaze.
The so-called Beaver Creek fire has destroyed one home and seven other buildings and forced the evacuation of thousands. It was sparked by lightning nearly two weeks ago outside Sun Valley, one of three tourist communities that make up a resort area in central Idaho valued at $8 billion.
Blaine County Sheriff Gene Ramsey told occupants of 725 homes in upscale developments south of the twin towns of Sun Valley and Ketchum that they could return but should be prepared to leave again at a moment's notice.
That reduced to 1,125 from a high of 2,250 the number of houses still under a mandatory evacuation order in the path of a fire that has prompted the Sun Valley ski resort to keep flames at bay by turning on water cannons usually used to make snow.
"I think the tide has turned in our favor today," said Blaine County spokeswoman Bronwyn Nickel.
More than 1,800 firefighters are assigned to a blaze that has raged across 106,000 acres (43,000 hectares) of drought-stricken sagebrush flats and pine forests in the Sawtooth Mountains.
Lower temperatures and higher humidity levels allowed firefighters to attack the fire directly instead of being on the defensive, said fire information officer Richard Reuse.
The fire has strained the area's tourism economy at the height of a summer season. The resort area known as the Wood River Valley is home to such celebrities as singer Barbra Streisand, director Steven Spielberg and actor Tom Hanks.
Elite firefighting units, known as hotshots, worked on the ground while helicopters dropped fire retardant on a flank of the fire that had advanced on Ketchum and crews protected homes that have been guarded by fire engines.
The flames were less than 10 percent contained. But fire managers said they were making headway because of lower temperatures, higher humidity levels and sustained ground and air operations that began on Sunday.
"We do feel pretty optimistic," said Beth Lund, incident commander with the U.S. Forest Service team managing the blaze. She said the fire might be as much as 50 percent contained in the coming days.
The Beaver Creek blaze is one of dozens of fires raging across Western states that have strained Forest Service resources because of federal budget cuts.
Officials with the National Interagency Fire Center in Boise said the indicator of fire preparedness, a measure of the demand for firefighting resources like crews and aircraft, has been raised to the maximum level for the first time since 2008.
Meanwhile, in Northern California, a wildfire that broke out on Saturday has destroyed two homes and authorities asked occupants of 2,500 residences west of Yosemite National Park to leave, said Jerry Snyder, spokesman for the Stanislaus National Forest.
The blaze increased by tenfold on Tuesday, growing from 1,000 acres on Monday to 10,000 acres.
Authorities closed Highway 120, east of Modesto, and said no traffic was being allowed out of the westbound entrance to Yosemite. The roadway can still be used by residents and recreationists seeking to leave the forest through the park.
More than 450 firefighters were battling the so-called Rim Fire, which was raging out of control across parched brush, scrub oak and pines in steep, rocky terrain that was difficult for crews to access, Snyder said.
In Yellowstone National Park, officials closed a 7.5-mile stretch of the park's main road under threat by a 4,500-acre wildfire.
Visitors have been asked to take a detour around Old Faithful geyser to reach Mammoth Hot Springs and other attractions north of Yellowstone Lake, park officials said.
Elsewhere in Idaho, authorities lifted an evacuation order for 65 homes in the path of an 8,000 acre blaze near the mountain town of Atlanta, east of Boise. (Editing by Dan Whitcomb and Christopher Wilson)