The bill would have prohibited companies from deducting expenses related to moving their operations to a foreign country. It also would have offered tax credits to companies that move operations to the U.S. from a foreign country.

The Senate voted 54-42 to end debate on the bill, six short of the 60 votes needed to advance it. The White House says President Barack Obama supports the legislation.

"Today in the United States, any time an American company closes a factory or plant in America and moves operations to another country, the American taxpayers pick up part of that moving bill," said Senate Majority Leader Harry Reid, D-Nev. "Frankly, a vote against this bill is a vote against American jobs."

Republicans called the bill an election-year stunt. They noted that Democrats tried to pass a similar bill two years ago, right before the last congressional elections.

Senate Republican Leader Mitch McConnell of Kentucky said the bill is "designed for campaign rhetoric and failure, not to create jobs here in the U.S."

Republicans also complained that Reid wouldn't allow any amendments. The legislation now joins a growing number of bills that have stalled in the Senate this year because Democrats and Republicans couldn't agree on amendments.

The bill would have cost U.S. companies that move overseas $143 million in additional taxes over the next decade, according to the Joint Committee on Taxation, which analyzes tax legislation for Congress. Companies moving into the U.S. would have seen their tax bills drop by $357 million over the same period.

The difference â€” $214 million â€” would have been added to the budget deficit.

The White House and some Democrats in Congress have been making the case that a growing number of U.S. corporations are using international tax loopholes to avoid paying U.S. taxes.

On Wednesday, Obama criticized U.S. companies that reincorporate overseas as a way to lower their U.S. tax bills. Many of these companies keep most of their operations in the U.S., including their headquarters.

The process, called an inversion, allows firms to shield more of their foreign earnings from being taxed in the U.S.

"You know, they are renouncing their citizenship even though they're keeping most of their business here," Obama said in a speech in Kanas City, Missouri.

"They shouldn't turn their back on the country that made their success possible," Obama added.

Some Democrats in Congress have been pushing legislation to make it harder for U.S. firms to reincorporate overseas mainly to avoid U.S. taxes.

Republicans say that instead of punishing corporations for leaving the U.S., Congress should make America's tax laws more inviting so more firms will want to come here.

At 35 per cent, the U.S. has the highest corporate income tax rate in the industrialized world. Many corporations, however, pay lower tax rates because the law is filled with many credits, deductions and exemptions.