The city of San Francisco is embarking on a pilot project to turn brown waste grease, known as FOG, in biofuel with help from $1.2 million in state and federal grants that will fund a public-private partnership with Philadelphia company BlackGold Biofuels and engineering firm URS Corp.

The plant will recycle the waste formed by used cooking fat, oil and grease, or FOG, that melds with food scraps.

FOG is a bane for commercial kitchens, which capture the stuff in grease traps and have it hauled away or chemically processed. It also poses big problems for municipalities because residential kitchens have no such filters and enough material from commercial kitchens escapes the traps and makes its way down the drain to clog sewer pipes.

About 50 percent of all San Francisco's sewer emergencies are caused by grease blockages and cost the city $3.5 million a year for cleanups, according to the San Francisco Public Utilities Commission.

The biodiesel facility, to be built at the city's Oceanside Treatment Plant next to the San Francisco Zoo, is expected to produce high-grade biodiesel for vehicles, lower grade boiler fuel for running sewage treatment plant equipment and converted methane to run the treatment plant.

The California Energy Commission supplied $1 million in grant funds with the balance coming from the U.S. Environmental Protection Agency.

The biofuel project is an extension of the SFPUC's SFGreasecycle program, established in 2007 to collect and recycle used cooking oil.

By November, the facility will be able to produce biodiesel at the rate of 100,000 per year, according to BlackGold Biofuels.