The Rim Fire burned right up the edges of San Francisco's Camp Mather, but a backburn and aggressive firefighting prevented any major damage at the site.

Fire saved Camp Mather from the third-largest wildfire in California's history.

The Rim Fire already had been burning for a couple of days before word reached The City's summer camp at the gates of Yosemite National Park.

At first, the concerns were air quality -- smoke from the flames, still 15 to 20 miles away, was the biggest risk to the 200 senior citizens at the camp -- and providing enough light to for a game of Bingo, after electricity to the camp was shut down Aug. 19 as a precaution.

But three days later -- after the fire tripled in size in a single night, advanced 5 miles in a single day -- the 330-acre, 89-year-old collection of city-owned cabins was one-eighth of a mile from destruction.

BEATING BACK THE BLAZE

In the end, it was the backfire -- a controlled blaze set by firefighters that robs the wildfire of fuel needed to advance -- located in a meadow on the camp's northwest edge on that Thursday afternoon that redirected the Rim Fire's path and saved Mather from the immolation that claimed much of the surrounding area, including Berkeley's Tuolumne Family Camp.

A backfire is a calculated risk. It can literally backfire if the wind changes course or if it grows out of control. But looking back on it, there's no doubt the move saved Camp Mather, says San Francisco Fire Department Assistant Chief Tom Siragusa, who was on hand to witness it.

"It was the most incredible day of my 37 years fighting fires," says Siragusa of that Thursday. "If that wouldn't have happened, or if it didn't work, Camp Mather wouldn't be here."

The threats to the city-owned camp continued for another three days as the Rim Fire burned around the entire camp and came at Mather's buildings from four points of the compass, a different direction on each day.

The camp became a center of activity. Helicopters drew water from Birch Lake, the camp's swimming hole, to dump on the flames. A herd of cattle from the ranch next-door had arrived for haven from the inferno.

In the end, after the flames spread up the hills to higher elevations, the only damage sustained at Mather was scorching to the water tanks, when wooden boxes put over valves on the tank's pipes burst into flames from the intense heat.

TIES TO THE CITY

It's hard to describe what Camp Mather means to San Franciscans. More than 1,500 families spend at least part of the summer at the camp, which lies more than 170 miles away from The City at the edge of Yosemite National Park. Many who go do so again and again, and the history runs deep for those who were there during the fire. A member of the San Francisco Fire Department's wildfire strike team's first job was as a dishwasher at the camp. Paul Spring, the camp's year-round caretaker, has been there every year since the 1950s when he first went as a child.

To call Mather beloved is an understatement. During the fire's worst days, when incident report maps showed the area where Mather is surrounded by flames, and rumors spread of damage to buildings, Recreation and Park Department Phil Ginsburg was flooded with calls asking after the camp.

"You just can't quantify [its value]," he said Thursday. "You just can't."

Spring, Camp Director Mike Cunnane and other San Francisco Recreation and Park Department employees made the unheard-of move to leave the camp in midseason on the Wednesday as the fire approached, since the blaze had gone from smoke issue to life-threatening emergency. They were only gone for a day -- after shutting off propane lines and doing what else they could to prepare, a one-day evacuation ended when they returned Thursday in time to watch the backfire save their camp.

THE AFTERMATH

Evidence of the Rim Fire will be around Mather for a long time to come -- and while the buildings are undamaged, much has been lost. Trees and plants around the camp's most-popular hiking trail are entirely gone. Telephone poles - some of the 300 to 400 the San Francisco Public Utilities Commission needs to replace -- are stacked at the camp's ball field.

This past Monday, Cunnane -- whose 2013 summer was his 40th at the camp, since he started as a dishwasher at 18 -- surveyed the burned water tank. He stepped around a large pit in the ground, left after a tree burned down to the roots, leaving bootprints in the fine white ash that leads observers of the 40-square mile burn area left by the fire a "moonscape."

Cunnane -- who had seen wildfires near the camp before, but never like this -- lays it out simply.

"The camp has never come so close to being lost," said Cunnane, who like everyone else in Tuolumne County now is running out of words to praise for the firefighters. He also credits something else for the Rim Fire being sent away.