PITTSBURGH – President Obama pressed Congress on Wednesday to scrap billions in oil company tax breaks and pass legislation to help the nation kick a dangerous “fossil fuel addiction,” trying to channel disgust over the worsening BP oil disaster into a force for clean energy.

Seeking opportunity in a crisis, Obama argued for congressional action as crews struggled into a seventh week to contain BP’s mangled oil well in the Gulf of Mexico. He urged lawmakers to shift the tax-break money toward clean-energy research and approve a major energy bill, now stalled in the Senate, that would slap a price on carbon emissions.

“Our continued dependence on fossil fuels will jeopardize our national security,” Obama said. “It will smother our planet. And it will continue to put our economy and our environment at risk.”

Among the costs, Obama said in a speech at Carnegie Mellon University, is the risk that comes with drilling deep below offshore waters to find oil. He received sustained applause when he said, “We have to acknowledge that an America that runs solely on fossil fuels should not be the vision that we have for our children and grandchildren.”

Obama’s tough words about Big Oil came as he and BP face growing unhappiness from a public watching the disaster unfold day by day. What started with an oil rig explosion on April 20 has become the worst spill in U.S. history, with oil reaching shorelines and still gushing with no permanent fix in sight.

Obama faces serious difficulties in pushing for the bill he wants: a shrinking legislative window in a divisive election year, the distracting nature of the oil spill crisis itself, and the contentious idea of putting a price on carbon pollution.

The House last year passed legislation creating a system, known as “cap and trade,” to limit global warming emissions and auction allowances to polluters. A bipartisan effort on a different version of climate and energy legislation in the Senate has been in the works for months but has no clear path ahead.

“The votes may not be there right now, but I intend to find them in the coming months,” he said.

Tucked in there was a reminder from the president that he does support more offshore drilling at home. Obama was viewed by environmentalists as proposing giveaways to the oil industry when he announced a limited expansion of offshore drilling in March.

Since the Gulf explosion, Obama has pulled back on some of those plans and ordered an investigation into the spill.