(Adds details from San Francisco utilities, details on Idaho fire)
By Laila Kearney
SAN FRANCISCO, Aug 24 (Reuters) - A fast-moving wildfire on the edge of Yosemite National Park has forced the closure of two more areas of the park, but an official said on Saturday he was cautiously optimistic that firefighters could halt the advance of flames.
The so-called Rim Fire, which had grown to just over 125,000 acres (50,585 hectares) as of early Saturday, remained largely unchecked with extreme terrain hampering efforts at containment, which stood at 5 percent.
The fire had blackened about 12,000 acres (4,856 hectares) in the northwest corner of Yosemite on Saturday, up 1,000 acres from the day before, said Yosemite spokesman Scott Gediman. It was consuming brush, oaks and pines and threatened some giant sequoia trees in the park.
"We're working very closely with the fire team, but we're not looking at any further closures," he said. "Things are - knock on wood - things are looking good."
Officials have closed parts of the park's northwestern edge throughout the week, including the Hetch Hetchy Reservoir area, Lake Eleanor and Lake Cherry. The fire on Saturday remained about 4 miles (6.4 km) west of the reservoir and more than 20 miles (32 km) from Yosemite Valley, the park's main tourist center, Gediman said.
The latest sections to close are Tuolumne Grove and Merced Grove. Officials said they have no plans to shut down the entire park or its top attractions.
Daniel Berlant, a spokesman for the California Department of Forestry and Fire Protection, said crews were making progress but the steep terrain in the area "definitely has posed a major challenge."
The fire was threatening power and water supplies to San Francisco about 200 miles (320 km) to the west.
California Governor Jerry Brown on Friday declared a state of emergency for San Francisco, saying the fire had damaged the electrical infrastructure serving the city and forced the local Public Utilities Commission to shut down power lines.
The Hetch Hetchy Reservoir provides water to 2.6 million customers in the San Francisco area and Brown in his declaration said the city's water supply could be affected if the blaze harms the reservoir.
The reservoir provides about 85 percent of San Francisco's water needs and has not been disrupted by the fire, said Tyrone Jue, spokesman for the San Francisco Public Utilities Commission.
San Francisco could draw on water from neighbors if the supply is compromised, he said.
There have been no reports of blackouts in San Francisco, which is drawing on a reserve of power stored for emergencies. It also has spent around $700,000 buying power on the open market after two powerhouses in the path of the fire were shut down.
Berlant, the forestry spokesman, said about 2,700 firefighters were expected to be on the front lines on Saturday to fight the fire, which started on Aug. 17 in the Stanislaus National Forest.
Yosemite, one of the nation's major tourist destinations, attracted nearly 4 million visitors last year. The park has been posting updates and alerts on its website. (Alerts: http://www.nps.gov/yose/index.htm)
The blaze in the western Sierra Nevada Mountains is now the fastest-moving of 50 large wildfires raging across the drought-parched U.S. West that have strained resources and prompted fire managers to open talks with Pentagon commanders and Canadian officials about possible reinforcements.
There has been one reported injury, a heat-related injury to a firefighter, said U.S. Forest Service spokeswoman Ashley Taylor. About 4,500 residences, three commercial buildings and 1,000 outbuildings are currently threatened by the fire, she said.
Through Friday, the fire had destroyed four homes and 12 outbuildings.
An American Red Cross shelter at the Mother Lode Fairgrounds in Tuolumne County located north and west of the fire had 184 people on Saturday, spokesman Jordan Scott said.
Campers forced from Stanislaus National Forest had taken shelter there earlier in the week, but the fairgrounds shelter now had people forced to leave their homes, he said.
"People coming in are obviously concerned about their home and their situation," but their spirits have been "generally upbeat," Scott said.
Highway 120, one of four access routes to Yosemite, which is known for its waterfalls, giant sequoia groves and other scenic wonders, was temporarily closed. The highway leads to the west side of the 750,000-acre (300,000-hectare) national park.
Dozens of miles north of the fire in Reno, Nevada, smoke from the Rim Fire and other nearby wildfires led the local air quality agency to notify residents of the potential for poor air conditions through Tuesday.
Several outdoor events in northwest Nevada scheduled for Friday and Saturday have been canceled or postponed, including a Reno food festival, according to local news station KOLO8.
Also on Saturday, more than 1,000 firefighters were closing in on a sprawling 111,200-acre (45,000-hectare) wildfire now about 75 percent contained near the ski resort town of Sun Valley in central Idaho.
The 2013 fire season has already drained U.S. Forest Service fire suppression and emergency funds, causing the agency to redirect $600 million meant for other projects like campground and trail maintenance and thinning of trees to reduce wildfire risks, agency spokesman Mike Ferris has said. (Additional reporting by Noreen O'Donnell in New York, Laura Zuckerman in Salmon and Alexia Shurmur in Las Vegas, Idaho; Editing by Alex Dobuzinskis and Xavier Briand)