With a 60-38 vote, the Senate adopted the law giving President Obama the power to “fast-track” talks on free-trade pacts such as the Trans-Pacific Partnership (TPP) after months of fierce debate in both houses of the Congress.

Trade Promotion Authority (TPA), as the measure is called, means that Congress will only get to vote up or down on the treaties in question once they are finalized by the White House, without the ability to offer amendments.

Obama has faced strong opposition from his own Democratic Party, with prominent lawmakers such as Elizabeth Warren (D-Mass.) and Bernie Sanders (I-Vermont) in the Senate and Nancy Pelosi (D-Calif.) in the House breaking ranks to speak and vote against the measure.

READ MORE: TPP supporters flood pro-trade senators with millions in donations

Meanwhile, Republican lawmakers that usually oppose Obama at every turn by and large backed the president on the issue, though with some notable exceptions. Senator Ted Cruz (R-Texas), one of the contenders for the Republican presidential nomination, voted against closing the debate on TAP on Tuesday.

After the measure barely squeaked by with 60 votes in favor, Senator Jeff Sessions (R-Alabama) accused the US government of not serving the needs of its citizens, saying the White House “broke arms and heads” to scrape up the required majority.

“When ordinary Americans who never asked for the plan, who don’t want the plan, who want no part of the plan, resist, they are scorned, mocked, and heaped with condescension,” Sessions said in a statement. “It is remarkable that so much energy has been expended on advancing the things Americans oppose, and preventing the things Americans want.”

READ MORE: Squeaking through: Senate clears way to approve Obama’s ‘fast-track’ powers

Opposition by the Democrats meant a rocky road for the TPA in Congress. After losing the first procedural vote on May 12, the measure ended up passing the Senate on May 23. The House approved fast-track powers on June 12, but struck down the companion measure without which the proposal could not move forward – only to approve a standalone fast-track bill on June 18.

House Democrats tried to hold TPA hostage by refusing to back Trade Adjustment Assistance (TAA), a program giving government aid to workers who lost their jobs as a consequence of free-trade deals. With the TPA’s passage, continued opposition to TAA made no sense. Pelosi, leader of the Democrats in the House, signaled she would back the bill when it came up for a vote later this week.

"TAA was being used as a bargaining chip for TPA, and that's why we very much resisted," Sandy Levin (D-Michigan) told reporters on Wednesday after a meeting of the Democratic Caucus.

Some Democrats were displeased that the Republican leadership in the House packaged the TAA with the African Growth and Opportunity Act (AGOA), but the caucus decided that opposing the measures would send the wrong message.

"It's disgusting that they were attached, but we have to play the hand we were dealt,” said G.K. Butterfield (D-NC), chairman of the Congressional Black Caucus, adding he will vote in favor of the bill.

JUST IN: Pelosi endorses TAA after blocking it last week to sink fast-track bill http://t.co/t9bh3jgMJMpic.twitter.com/EXSQRsV98C — The Hill (@thehill) June 24, 2015

Many groups are opposed to the proposed free-trade pacts the White House has been negotiating in secrecy. Environmentalists object to the leaked language limiting US ability to legislate against climate change. Labor unions are concerned the pacts would result in more American jobs lost to overseas competition, as has happened with previous free-trade deals. While the conservatives favor the free trade aspects of the pacts, they have raised concerns over immigration and certain provisions that could supersede US sovereignty.