SAN FRANCISCO – Inside an industrial warehouse in south San Francisco, Harrison Dillon, chief technology officer of startup Solazyme Inc., examines a beaker filled with a brown paste made of sugar cane waste. While the smell brings to mind molasses, this goo, called bagasse, won’t find its way into people-pleasing confections.

Instead, scientists will empty it into 5-gallon metal flasks of algae and water. The algae will gorge on the treat — filling themselves with fatty oils as they double in size every six hours.

Down the hall, past a rainbow of algae strains arrayed in petri dishes, Chief Executive Officer Jonathan Wolfson shows off a gallon-size bottle of slightly viscous liquid. After drying Dillon’s algae, wringing out the oil and shipping it to a refinery, this is the prize: diesel fuel that Wolfson says is chemically indistinguishable from its petroleum-based equivalent and which has already powered a Jeep Liberty and a Mercedes-Benz sedan.

“We’ve produced tens of thousands of gallons, and by the end of 2010, I hope I can say we’ve produced hundreds of thousands,” Wolfson, 39, says. “In the next two years, we should get the cost down to the $60-to-$80-a-barrel range.”

At that price, Solazyme’s algae fuel would compete with $80-a-barrel oil.

In Japan, Britain and the United States, green-energy advocates and some well-heeled investors are obsessed with perfecting a way to turn the scum that coats ponds, lakes and fish tanks into a substitute for gasoline, jet fuel and diesel.

Algae, mostly single-cell photosynthetic organisms that usually elicit a “yuck,” can yield 30 times more oil than crops such as soy. Algal oil doesn’t need much processing before it can power a car, truck or jet engine, says Matt Carr, a policy director at the Biotechnology Industry Organization.

Algae have advantages over producers of other so-called biofuels. They don’t compete for land with a crop that feeds people and animals. Corn-based ethanol, the first viable biofuel, produces just two-thirds as much energy as gasoline and corrodes pipelines and car engines, says Anthony Marchese at Colorado State University, who is taking part in a $48 million Department of Energy research project.

Supporters say algae overcome these disadvantages while eating twice their weight in carbon dioxide, reducing what some scientists say is a leading cause of global warming.

“The potential payoff is huge,” Carr says.

Microsoft co-founder Bill Gates and Venrock Associates, the Rockefeller family’s venture-capital firm, along with Britain’s Wellcome Trust and Chicago’s Arch Venture Partners, have poured $100 million into Sapphire Energy Inc., which is trying to produce gasoline from algae.

President Obama talked up alternative fuels during his 2008 campaign, vowing to push for the country to use 60 billion gallons of advanced biofuels by 2030. The Department of Energy has provided more than $185 million in grants for algal biofuels.

The British government-funded Carbon Trust, which aims to trim carbon emissions, is providing $11.7 million to nine universities for algae research.

In Japan, Toyota and oil refiner Idemitsu Kosan may join a research program with the University of Tsukuba, northeast of Tokyo, to turn algae into fuel.

Exxon Mobil threw its weight behind algae in July 2009. The oil giant, often a target of environmentalists for dismissing concerns about global warming, is investing $600 million.

Exxon is working with La Jolla, Calif.-based Synthetic Genomics, a company founded by Craig Venter. Venter’s team is working on changing the genetic code of some algae to make it easier to extract the oil.

“We spent two years evaluating all kinds of biofuels, assessing their scalability, technical challenges, environmental impact and commercial viability,” says Emil Jacobs, Exxon Mobil’s vice president of research and development.

“Algae had the best potential,” he says.

Potential is the operative word. No one has produced enough algae fuel commercially to run a family’s SUV, let alone make a dent in the more than 200 billion gallons of gasoline, diesel and jet fuel that the U.S. uses every year.

The Carbon Trust is funding research to make 70 billion liters by 2030, equivalent to 6 percent of current global diesel use. To do that, algae ponds would have to cover an area larger than Wales or New Jersey, says Ben Graziano, technology commercialization manager at Carbon Trust.

“It may take billions of dollars to set up the infrastructure,” says John Benemann, a biofuels consultant who worked on a 17-year Department of Energy algae study.

Silicon Valley pioneer Vinod Khosla is among the biggest investors in green technologies. His Khosla Ventures has bets on cellulosic ethanol company Range Fuels Inc. and LS9 Inc., which designs microbes to produce nonpolluting biofuels.

Khosla says algae fuel is a pipe dream.

“We looked at two dozen algae business plans and have not found one that was a viable plan,” says Khosla, speaking from his Menlo Park, Calif., office.

Wolfson says he needs $150 million to build a commercial plant to produce 100 million gallons a year.

He predicts that algal oil will cost $60 to $80 a barrel within 12 to 24 months.

“We don’t have a business in fuel until we are at parity with fossil fuels,” he says. “There is no silver bullet for our problem of replacing fossil fuels; maybe a silver buckshot.”