U.S. President Barack Obama's call to end subsidies to American oil companies has been soundly rebuffed by American lawmakers.

Just moments after Obama delivered a speech in which he said record profits show "the oil industry is doing just fine", a bipartisan vote derailed the legislation.

The Senate failed to get the necessary two-thirds vote to proceed to a measure that would have ended the subsidies. Obama had argued that Americans are getting hit twice — once at the gas pump, and once more by sending billions of dollars in tax subsidies to oil companies.

"When the price of oil goes up, prices at the pump go up, and so do these companies’ profits," Obama said in his speech.

"Meanwhile, these companies pay a lower tax rate than most other companies on their investments — partly because we’re giving them billions in tax giveaways every year."

"It's not like these are companies that can't stand on their own" —President Barack Obama

The Senate vote was 51-47, short of the 60 votes necessary. Two Republicans voted to procede to the legislation, But four Democrats rejected the effort.

It comes at a politically charged time as politicians prepare for the fall election, while consumers are burdened by rising gasoline prices.

"American oil is booming," Obama said. "That’s why I think it’s time they got by without more help from the taxpayers, who are already having a tough enough time paying the bills and filling up their gas tanks."

"It's not like these are companies that can't stand on their own."

He added that member of Congress can either "stand with the big oil companies, or they can stand with the American people."

The legislation would have applied to what are known as "the big five" oil companies; Exxon, Chevron, ConocoPhillips, BP, and Shell.

Currently, the U.S. government provides $4 billion in subsidies every year to the major oil producers.

Obama said the funds would be better spent to invest in clean energy.

Quick criticism

Republican lawmakers were quick to criticize the proposal, saying that oil companies will simply pass on the costs to consumers, further increasing the cost of gasoline.

Senate Minority Leader Mitch McConnell called the proposal a "tax hike on American energy manufacturers."

"Is this the best we have to offer folks who are staring at $4 a gallon gasoline? A bill that even Democrats admit won't do anything to lower the price of gas?" he asked.

Others argue that the proposed legislation will curb domestic oil production, which could in turn threaten jobs and increase oil prices.

According to the White House, the three largest U.S. oil companies earned profits totalling $80 billion last year. Obama singled out Exxon, saying the company made nearly $4.7 million every hour in 2012.

White House spokesman Jay Carney said Obama would continue pressing for repeal of the subsidies.

"That was an unfortunate vote," he said of Thursday's Senate action. Obama "won't stop calling for this, it makes zero sense to have the American taxpayer subsidize oil and gas companies who are enjoying record profits."

With files from The Associated Press