TUOLUMNE CITY, Calif. 
Crews working to contain one of California's largest-ever wildfires gained some ground Monday against the flames threatening San Francisco's water supply, several towns near Yosemite National Park and historic giant sequoias.

Containment of the Rim Fire more than doubled to 15 percent, although it was within a mile of the park's Hetch Hetchy Reservoir, the source of San Francisco's famously pure drinking water, officials said Monday.

"Obviously, it's the water supply of the city of San Francisco, so we're paying a lot of attention to that," said Glen Stratton, an operations section chief on the fire.

San Francisco water authorities were scrambling to fill area reservoirs with water from Hetch Hetchy before ash taints supplies, said Harlan Kelly Jr., general manager of the city's Public Utilities Commission. The city is able to move water more quickly out of Hetch Hetchy because of a recent multibillion-dollar improvement to the piping system.

Ash from the 234-square-mile fire has been falling on the reservoir, but so far hasn't sunk far enough into the lake to reach intake pumps, Kelly said. Water quality remained good on Monday.

San Francisco gets 85 percent of its water from Hetch Hetchy as well as power for municipal buildings, the international airport and San Francisco General Hospital. The threat to the city's utilities prompted Gov. Jerry Brown to declare a state of emergency for San Francisco.

Kelly said the city has a six-month supply of water on hand. If ash eventually causes turbidity, it will have to filter supplies, although he was unsure how much that would cost.

The agency also was checking 12 miles of hydroelectric transmission lines that supply city facilities with power. An emergency declaration has allowed the city to spend $600,000 for power on the open market.

The fire also posed a threat to giant sequoias in Yosemite National Park. Crews were using sprinklers and lighting fires to clear brush, though the fire remained several miles from the massive trees, Stratton said.

Another part of the fire that is also burning into the park was not of major concern because it was running into rocks that are not heavily forested, Stratton said.

The governor planned to visit a fire base camp on Monday to meet with state and federal emergency officials. Brown spoke Sunday to President Barack Obama, who reiterated his commitment to providing needed federal resources, according to the White House.

While it has closed some backcountry hiking, the fire has not threatened Yosemite Valley, where such sights as the Half Dome and El Capitan rock formations and Bridalveil and Yosemite falls draw throngs of tourists. Most of the park remained open to visitors. Park spokesman Scott Gediman said Monday morning he was not aware of any additional threats to the park overnight.

The U.S. Forest Service said about 4,500 structures were threatened by the fire. At least 23 structures have been destroyed, though officials have not determined whether they were homes or rural outbuildings.

Additional personnel brought in to help raised the total number of firefighters to more than 3,600 on Monday, said state fire spokesman Daniel Berland.