In the wake of lobbying by President Obama and Senate Democratic leaders, the Senate Thursday defeated legislation to speed up construction of a U-S.-Canadian oil pipeline.

The White House victory came after the president started personally calling Democratic senators Wednesday night. The vote underscored the extent to which rising gas prices and energy supply have become a central political issue.

Republicans--along with the oil industry, which is running a nationwide advertising campaign about energy supplies -- have been attacking Obama on the campaign trail for failing to fully exploit traditional oil and gas resources while Americans are financially stretched. Democrats and their environmental supporters counter that the president must weigh the benefits of fossil fuels against their environmental impact and the importance of promoting renewable energy.

The dispute came to a head Thursday afternoon on Capitol Hill, as the Senate considered two competing amendments to a federal transportation bill addressing the Keystone XL pipeline extension, which would carry heavy crude oil from Alberta’s oil sands to gulf coast refineries. The project requires pipeline’s builder, TransCanada, to get a federal permit from the State Department because it crosses an international border; Obama rejected the permit in January when faced with a congressionally-mandated deadline of Feb. 21.

GOP Sens. John Hoeven (N.D.), Richard G. Lugar (Ind.) and David Vitter (La.) offered an amendment Thursday that would have eliminated TransCanada’s need for a federal permit to cross the U.S.-Canadian border, while allowing Nebraska unlimited time to develop an alternative route through its territory. At the time Obama rejected the permit, he said he could not approve the pipeline until the firm hoping to build it developed a route circumventing the environmentally sensitive Sandhills area in Nebraska.

Lugar said in a floor speech that building the “pipeline would create thousands of private sector jobs, and it would help protect United States national security interests. It comes at no taxpayer expense, and it will strengthen vital ties with our ally Canada.”

Proponents needed 60 votes for a filibuster-proof majority; the final tally on the amendment was 56-42.

Seconds after the vote, Senate Minority Leader Mitch McConnell (R-Ky.) issued a statement blaming Obama for killing the amendment.

“Democrat opposition to this legislation shows how deeply out of touch they are with the concerns of middle-class Americans,” McConnell said. “President Obama’s personal pleas to wavering senators may have tipped the balance against this legislation. When it comes to delays over Keystone, anyone looking for a culprit should now look no further than the Oval Office.”

Opponents of the pipeline argue that extracting energy-intense crude from the oil sands will accelerate climate change and that oil could spill on the ecologically fragile habitat along its route.

Sen. Charles E. Schumer (D-N.Y.) told reporters that Democrats would not yield to pressure to speed up construction of the pipeline when TransCanada has not outlined its full route. Senate Majority Leader Harry Reid (D-Nev.) and his deputies worked behind the scenes to mobilize opposition to the amendment.

Late last month TransCanada said it will push ahead with plans to build the segment running from Cushing, Okla., to Port Arthur, Tex., and will apply later on for a federal permit for the cross-border section of the pipeline. That move would alleviate the glut of oil at Cushing, a major terminal, and address one of the main reasons for building the pipeline extension.

“We have to see a plan for the Keystone pipeline, and the idea of saying vote for it before you see a plan, particularly when the first plan was so bad, is a bad idea,” Schumer said. “So I’m waiting to see what the company’s plan is, and I don’t think any of us, or most of us at least on our side, are going to be rushed into something until we see what the plan is.”

There are 47 Senate Republicans, so Hoeven would have had to bring over 13 Democrats to ensure a 60-vote victory.

When it became clear Wednesday that the measure had some Democratic support and could possibly reach 60 votes, Obama called senators to urge them to reject the Hoeven amendment.

Before the vote, White House spokesman Jay Carney did not identify which senators the president had spoken with, but said that the administration hopes Congress would “act in the appropriate fashion and not waste time on an ineffectual, sham legislation that has no impact on the price of gas and is irresponsible, because, as we said before, it tries to legislate the approval of a pipeline for which there is not even a route. We’ll keep making that point in telephone calls, from the podium, maybe fly a Cessna overhead with a banner.”

Sen. Kay Hagen (D-N.C.) would neither confirm nor deny Thursday that she had talked with Obama about the pipeline. She told reporters she had not spoken to Obama “today” but decided to support speeding up the permit “ because I think it’s going to happen, and I think that it’s just something that we need to go ahead and be more energy independent from foreign oil. Obviously it has to be done in an environmentally safe way.”

Several key Senate Democrats said they had not heard from the president on the issue. Sen. Bob Casey (R-Pa.), who faces a tough reelection bid in a swing state in November, said he was still deciding how to vote even as he entered the Senate chamber for a long series of votes in the afternoon, said he had not heard from Obama. So did Sen. Mark Pryor (D-Ark.), who said he’s been a longtime supporter of the pipeline. “I think he knew where I was,” Pryor said.

Sen. Ben Nelson (D-Neb.) said he would vote against the amendment but indicated that he had not spoken with Obama about it.

“I don’t think Washington ought to be engaged in this. So far, all Washington’s engagement has done is delay the whole process,” he said.

Sen. Mark Warner (D-Va.) said he supports building the pipeline but thinks the issue should have been linked with a package to extend tax credits for alternative energy producers and a bipartisan measure to support energy conservation.

“I have a feeling we’re going to see this issue again. I hope next time we can do it in a way that actually takes a meaningful step toward a rational energy policy,” he said. But Warner would not say whether Obama had reached out to him.

“I’m not going to talk about who called me and didn’t call me,” he said.

Environmentalists hailed the amendment’s defeat: Gene Karpinski, president of the League of Conservation Voters, issued a statement applauding “those Senators who today stood up to the corporate special interests and helped reject Big Oil’s agenda.”

The Senate also rejected a competing measure by Sen. Ron Wyden (D-Ore.) that would have required the pipeline permit application to be approved or denied within 90 days of the completion of all analyses required by current law and executive orders. That measure — which lost 34 to 64 -- would have given the White House considerably more latitude, though it would have imposed additional requirements on the project. Wyden’s amendment would have banned the export of Canadian crude oil transported on the pipeline without a presidential waiver and would have required the pipeline to be built with American products whenever possible.

The pipe for the project has already been manufactured: According to TransCanada, 65 percent of it was produced in Little Rock, Ark., while the rest was made in Canada, Italy and India.

Even as senators feuded over whether to bring additional Canadian heavy crude into the United States, they voted 76 to 22 to steer 80 percent of any fines and penalties BP ends up paying the federal government for the 2010 oil spill in the Gulf of Mexico to that region for environmental and financial restoration.

Rosalind S. Heldeman contributed to this report.