By Laila Kearney

SAN FRANCISCO (Reuters) - One of the largest wildfires in California history roared deeper into Yosemite National Park on Tuesday while flames of the sprawling blaze crept closer toward thousands of homes outside the park, fire officials said.

The blaze, which has burned for 11 days mainly in the Stanislaus National Forest adjacent to Yosemite, nearly doubled its imprint in the park overnight after encroaching on a reservoir that serves as the primary water supply for San Francisco some 200 miles to the west.

Officials said some ash from the fire had drifted onto the surface of the Hetch Hetchy Reservoir, but testing of samples taken from the artificial lake showed that water quality remained healthy.

If the water should become fouled by too much ash and soot and require filtration, it can be diverted through a treatment plant near San Francisco before being delivered to customers, officials from the city Public Utilities Commission said.

Meanwhile, a firefighting force of some 3,700 personnel, backed by teams of bulldozers and water-dropping helicopters, continued to make headway in their drive to encircle and suppress the flames.

By late on Monday, containment lines had been established around 20 percent of the fire's perimeter, nearly triple Sunday's figure, though the overall footprint of the blaze continued to grow as much of the firefighting effort focused on structure protection.

"We are making progress," Daniel Berlant, a spokesman for the California Department of Forestry and Fire Protection, said on Tuesday, adding that fire managers were looking forward to a cooling trend forecast for the end of the week. "That would bring some much-needed relief," he said.

The blaze was among the fastest-moving of dozens of large wildfires raging across the drought-parched U.S. West. The fires have strained resources and prompted fire managers to open talks with Pentagon commanders and Canadian officials about possible reinforcements.

BUFFER ZONES AROUND HOMES

The so-called Rim Fire has charred nearly 180,000 acres - an area larger than the land mass of Chicago - since it erupted August 17, most of that in the Stanislaus National Forest west of Yosemite, Berlant said.

It ranks as the biggest California wildfire since October 2007, when the Witch Fire torched nearly 198,000 acres and more than 1,600 structures in San Diego County, and the sixth-largest in state history, according to CalFire records.

Firefighters hacking through dense, dry brush and trees to create clearings in the rugged terrain rushed on Tuesday to shore up buffer zones around some 4,500 homes threatened by the blaze on its northwestern flank, Berlant said.

Most of those dwellings have been ordered evacuated or were under advisories urging residents to leave voluntarily or be ready to flee at a moment's notice. The fire has already destroyed dozens of homes and cabins, Berlant said, but no serious injuries have been reported.

The fire also ravaged a 91-year-old summer camp operated by the Bay-area city of Berkeley - the Tuolumne Berkeley Family Camp - west of the park on Sunday, days after a nearby Jewish camp called Camp Tawonga was damaged.

As of Tuesday morning, the blaze had scorched some 42,000 acres of Yosemite - almost double the number from late Monday. The fire has forced the closure of some campgrounds in the northern part of the park and the main entrance road from the San Francisco Bay area. (http://www.nps.gov/yose/index.htm)

Two famous stands of giant sequoia trees, the Merced Grove and the Tuolumne Grove, were in the path of advancing flames and also have been shut down for several days.

But the vast majority of the 1,200-square-mile park, including the Yosemite Valley area renowned for its towering rock formations, waterfalls, meadows and pine forests, remained open to the public.

The Rim Fire, named for a Stanislaus National Forest lookout point called Rim of the World, has already damaged two of the three hydropower generating stations linked to the Hetch Hetchy Reservoir that supply electricity for all of San Francisco's public facilities, such as hospitals and firehouses.

But the city has been drawing on reserve power stored for emergencies and purchasing additional electricity on the open market to make up for the difference.

The reservoir itself provides 85 percent of the water consumed by some 2.6 million people in San Francisco and surrounding communities - roughly 300 million gallons carried to the Bay area daily by tunnels and an aqueduct.

The cause of the blaze remained under investigation.

(Reporting by Laila Kearney; Writing by Steve Gorman; Editing by Cynthia Johnston, Bernard Orr)