PENSACOLA, Fla. - The BP oil slick drifted perilously close to the Florida Panhandle's famous sugar-white beaches Wednesday as a risky gambit to contain the leak by shearing off the well pipe ran into trouble a mile under the sea when the diamond-tipped saw became stuck.

BP said it was about halfway finished slicing through the pipe when the saw snagged. The company said Wednesday night that it took 12 hours to free the saw and that preparations were under way to resume cutting.

The plan was to fit a cap on the blown-out well at the bottom of the Gulf of Mexico to capture most of the spewing oil; the twisted, broken pipe had to be sliced first to allow a snug fit.

"I don't think the issue is whether or not we can make the second cut," said Coast Guard Adm. Thad Allen, the government's point man for the crisis. "It's about how fine we can make it, how smooth we can make it."

Speaking in Pittsburgh, President Obama pressed Congress to scrap billions in oil company tax breaks and pass legislation to help the nation kick a dangerous "fossil-fuel addiction" as he tried to channel disgust over the worsening oil disaster into a force for clean energy.

Obama 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 put a price on carbon emissions.

"Our continued dependence on fossil fuels will jeopardize our national security," he declared. "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."

As the edge of the oil slick drifted within seven miles of Pensacola's beaches, emergency workers rushed to link the last in a miles-long chain of booms designed to fend off the oil. They were stymied by thunderstorms and wind before the weather cleared in the afternoon.

Forecasters said the oil would probably wash up by Friday, threatening a delicate network of islands, bays, and white-sand beaches that are a haven for wildlife and a major tourist destination dubbed the "Redneck Riviera."

"We are doing what we can do, but we cannot change what has happened," said John Dosh, emergency director for Escambia County, which includes Pensacola.

Since the biggest oil spill in U.S. history began to unfold April 20 with an explosion that killed 11 workers aboard an offshore drilling rig, crude has fouled 125 miles of Louisiana coastline and washed up in Alabama and Mississippi as well. Over the last six weeks, the well has leaked anywhere from 21 million to 45 million gallons by the government's estimate.

The latest attempt to control the leak is considered risky because slicing away a section of the 20-inch-wide riser could remove kinks in the pipe and temporarily increase the flow of oil by as much as 20 percent.

If the strategy fails - like every other attempt to control the leak 5,000 feet underwater - the best hope is probably a relief well, which is at least two months from completion.

As the oil drifted closer to Florida, beachgoers in Pensacola waded into the gentle waves, cast fishing lines and sunbathed, even as a two-man crew took water samples. One of the men said they were hired by BP to collect samples to be analyzed for tar and other pollutants.

A few feet away, Martha Feinstein, 65, of Milton, Fla., pondered the fate of the beach she has been visiting for years. "You sit on the edge of your seat and you wonder where it's going," she said. "It's the saddest thing."

Officials said the slick sighted offshore consisted in part of "tar mats" about 500 by 2,000 feet in size.

County officials set up the booms to block oil from reaching inland waterways but planned to leave beaches unprotected because they are too difficult to defend against the action of the waves and because they are easier to clean up.

"It's inevitable that we will see it on the beaches," said Keith Wilkins, deputy chief of neighborhood and community services for Escambia County.

Florida's beaches play a crucial role in the state's tourism industry. At least 60 percent of vacation spending in the state during 2008 was in beachfront cities. Worried that reports of oil would scare tourists away, state officials are promoting interactive Web maps and Twitter feeds to show travelers - particularly those from overseas - how large the state is and how distant their destinations may be from the spill.

Also Wednesday, two Democratic senators pressed BP to delay plans to pay shareholder dividends worth an expected $10 billion or more until the full costs for cleaning up the spill are calculated.

Sens. Charles E. Schumer of New York and Ron Wyden of Oregon called it "unfathomable" that BP would pay out a dividend to shareholders before the cost of the cleanup is known. In a letter to BP chief executive officer Tony Hayward, the lawmakers said that taking action to "move money off of the company's books" would make it more difficult for BP to pay the U.S. government, fishermen, and others affected by the environmental disaster.

BP P.L.C. has paid an estimated $1 billion over the leak and expects to spend billions more.

BP spokesman Toby Odone called the distribution of dividends "a company matter" that would be decided by company leaders. BP paid $10.4 billion in dividends last year and $10.3 billion in 2008.