Legislation giving President Obama the authority to negotiate expedited trade deals survived a critical procedural vote in the Senate on Tuesday, which will likely allow for passage of the bill that has become a top priority for President Obama and Republican congressional leaders.

Senators just barely voted to end debate on the trade promotion authority legislation, also called TPA or "fast track." Sixty votes were needed to end debate on the bill, and the Senate just barely made that hurdle, voting 60-37.

The vote ends any chance of a filibuster by Senate opponents. Because the House passed the TPA bill last week in a close 218-208 vote, a Senate vote on final passage, expected on Wednesday, will clear the bill for Obama's signature.

The measure advanced in the Senate after weeks of discord in both parties, during which factions of Republicans and a majority of Democrats vowed to block the bill for several reasons.

Democratic and Republican opponents of the bill believe it will facilitate new trade pacts that export U.S. manufacturing jobs and which do not enforce trade rules, giving foreign countries an unfair advantage. Some Republicans also feared TPA would cede too much power to Obama, who they already believe has overreached with his use of executive actions, particularly on immigration.

But ultimately, their efforts were quashed by pro-trade Democrats who voted with a majority of Senate Republicans to move the bill forward. Democratic help allowed the bill to win the needed 60 votes necessary for the bill to advance.

"This has been a long and rather twisted path to where we are today," Senate Majority Leader Mitch McConnell, R-Ky., said after the vote. "But it is a very very important accomplishment for the country."

Democrats who supported it argued that new trade deals would boost the U.S. economy by allowing the sale of American goods in foreign markets under more favorable terms.

"This is our chance to break down he tariffs and other barriers," Sen. Ron Wyden, D-Ore., argued before the vote. "Let's pry open foreign markets and send more of our products abroad."

The vote followed considerable wrangling in both the Senate and the House, where Democrats earlier this month were able to block the trade package by voting against an attached worker aid bill, the trade adjustment authority act (TAA), that they typically support.

After that, Republican leaders decided to split up the two bills. That allowed them to pass TPA in the House using the significant Republican majority. In the Senate, Democrats agreed to go along with splitting the bill under the assurance that the worker aid bill will get a vote this week.

Republican leaders promised to take up the TAA legislation as soon as the TPA legislation clears Congress.

"Trade adjustment assistance is an absolute must-pass bill," Wyden said. "And I am confident it is going to get through Congress and to the president's desk."