CAMBRIDGE, Mass.  Most research on renewable energy has focused on replacing the electricity that now comes from burning coal and natural gas. But the spill in the Gulf of Mexico, the reliance on Middle East imports and the threat of global warming are reminders that oil is also a pressing worry. A lot of problems could be solved with a renewable replacement for oil-based gasoline and diesel in the fuel tank  either a new liquid fuel or a much better battery.

Yet, success in this field is so hard to reliably predict that research has been limited, and even venture capitalists tread lightly. Now the federal government is plunging in, in what the energy secretary, Steven Chu, calls the hunt for miracles.

The work is part of the mission of the new Advanced Research Projects Agency - Energy, which is intended to finance high-risk, high-reward projects. It can be compared to the Defense Advanced Research Projects Agency, part of the Pentagon, which spread seed money for projects and incubated a variety of useful technologies, including the Internet.

The goal of this agency, whose budget is $400 million for two years, is to realize profound results  such as tens of millions of motor vehicles that would run 300 miles a day on electricity from clean sources or on liquid fuels from trees and garbage.