By Jonathan Allen

(Reuters) - A massive wildfire that has charred the northwestern edge of California's Yosemite National Park is heading towards two groves of the park's famed sequoia trees, National Park Service Director Jonathan Jarvis said as firefighters battled the blaze on Saturday.

The so-called Rim Fire, which now has an overall footprint that exceeds the area of Dallas, has burned about six percent of Yosemite's wilder backcountry but the vast majority of the park was still unaffected, Jarvis said.

The sequoias are expected to survive if the fire spreads through the groves of the towering redwoods that are among the park's most famous features, Jarvis said in a telephone interview.

"This is not a catastrophe for Yosemite National Park," he said in a telephone interview after surveying the affected areas. "These trees are very old and it's not the first fire they've ever seen."

Firefighters have been carrying out controlled burnings at night around the groves to clear away debris from the forest floor that could otherwise fuel a fire to such an intensity that it dangerously licks at the trees' crowns.

Lower-intensity fires, on the other hand, play a vital role in the reproductive cycle of the tough-barked sequoia, many of which bear the scars of past wildfires, by releasing the seeds from their cones and clearing the soil in which they germinate.

The so-called Rim Fire has continued to spread, having now consumed nearly 220,000 acres by Saturday, according to a U.S. Forest Service spokesman. Most of the damage is in the Stanislaus National Forest that spreads out from Yosemite's western edge.

Firefighters have contained about a third of that area.

"We're very, very cautious about the potential today," Timothy Evans, the spokesman, said. "Yesterday was very hot, there was some wind, and the same was somewhat predicted for today."

The blaze is now approximately tied with the Matilija wildfire in Ventura County of 1932 as the fourth-largest California wildfire on record.

Story continues

Jarvis estimated that firefighting efforts had so far cost state and federal agencies about $54 million. He criticized a decline in federal funding for fire-prevention work, including the practice of controlled fires that make the chance of a wildfire of this intensity less likely.

Nearly 5,000 people are working to put out the fire, including firefighters from agencies across California and nearly 700 specially trained California prison inmates.

Tourism-dependent businesses around the park have bemoaned a slump in visitors at the peak of the late-summer tourist season. Jarvis said there was no need to for visitors to stay away.

"Yosemite Valley is open to the public and is gorgeous," he said, referring to one of the park's most scenic and visited areas, adding that it is more than 20 miles from the edge of the fire.

The cause of the fire remains under investigation.

(Reporting By Jonathan Allen; Editing by Scott Malone and Sandra Maler)