TUOLUMNE CITY, Calif. — Crews were finally gaining ground by late Monday on a massive wildfire burning near Yosemite National Park as officials also expressed optimism that no water or power disruptions would come from the blaze burning along the shores of the main reservoir that supplies San Francisco.

While the fire continued to grow in size, containment numbers were up, as was the positivity that firefighters were making progress, said Glen Stratton, an operations section chief on the blaze.

"It looks great out there. No concerns," Stratton said of the Hetch Hetchy Reservoir.

Nearly 3,700 firefighters battled the roughly 252-square-mile blaze, the biggest wildfire on record in California's Sierra Nevada. The fire was 20 percent contained.

"It's been a real tiger," said Lee Bentley, fire spokesman for the U.S. Forest Service. "He's been going around trying to bite its own tail, and it won't let go but we'll get there."

While flames reached the edge of the reservoir, the chief source of San Francisco's famously pure drinking water, crews were confident they would be able to protect hydroelectric transmission lines and other utility facilities.

"I don't foresee any problems," Stratton said Monday night.

Utility officials monitored the basin's clarity and used a massive new $4.6 billion gravity-operated pipeline system to move water quickly to reservoirs closer to the big city.

So far the ash that has been raining onto the reservoir has not sunk as far as the intake valves, which are about halfway down the 300-foot O'Shaughnessy Dam. Utility officials said the ash is non-toxic but that the city will begin filtering water for customers if problems are detected.

Power generation at the reservoir was shut down last week so firefighters would not be imperiled by live wires. San Francisco is buying replacement power from other sources to run City Hall and municipal buildings.

It has been at least 17 years since fire ravaged the northernmost stretch of Yosemite that is under siege.

Park officials cleared brush and set sprinklers on two groves of giant sequoias that were less than 10 miles away from the fire's front lines, said park spokesman Scott Gediman. While sequoias have a chemical in their bark to help them resist fire, they can be damaged when flames move through slowly with such intense heat.

The fire has swept through steep Sierra Nevada river canyons and stands of thick oak and pine, closing in on Tuolumne City and other mountain communities. It has confounded ground crews with its 300-foot walls of flame and the way it has jumped from treetop to treetop.

Crews spent the day bulldozing firebreaks to protect Tuolumne City, several miles from the fire's edge.

Stratton said they would work through the night burning vegetation that could fuel the flames between the fire line and town. He said that while the community remains in harm's way, "I'm pretty optimistic."

Meanwhile, biologists with the Forest Service are studying the effect on wildlife. Much of the area that has burned is part of the state's winter-range deer habitat. Biologist Crispin Holland said most of the large deer herds would still be well above the fire danger.

Biologists discovered stranded Western pond turtles on national forest land near the edge of Yosemite. Their marshy meadow had burned, and the surviving creatures were huddled in the middle of the expanse in what little water remained.

"We're hoping to deliver some water to those turtles," Holland said. "We might also drag some brush in to give them cover."

Wildlife officials were also trying to monitor at least four bald eagle nests in the fire-stricken area.

While it has put a stop to some backcountry hiking, the fire has not threatened the Yosemite Valley, where such sights as the Half Dome and El Capitan rock formations and Yosemite Falls draw throngs of tourists. Most of the park remained open to visitors.

The U.S. Forest Service said the fire was threatening about 4,500 structures and destroyed at least 23.

Rugged terrain, strong winds and bone-dry conditions have hampered firefighters' efforts to contain the blaze, which began Aug. 17. The cause has not been determined.