Democratic opponents nearly halted that ambition for the second time this month. But last-minute deal-making on the Senate floor secured a 62-to-38 vote, just over the 60-vote threshold. Thirteen Democrats broke with the Senate leadership to back the president, giving manufacturers, farmers, Hollywood studios and pharmaceutical companies a huge lift, while knocking back the coalition of unions, environmentalists and liberal activists that oppose the trade accord.

“I want to thank the bipartisan group of senators who took a big step forward this morning on a trade agenda that is consistent with strong labor standards, strong environmental standards and access to markets that too often are closed even as these other countries are selling goods in the United States,” Mr. Obama told reporters at the White House.

The fate of the trade promotion bill remains in question. Opposition in the House was always expected to be stiffer than in the Senate. Still, the vote was a high and difficult hurdle. It also vindicated the strategy of Senator Mitch McConnell of Kentucky, the majority leader, who strictly limited the number of amendments to the bill and jammed it into the last week before Memorial Day.

“It was a nice victory,” Mr. McConnell said.

The Senate must still navigate a series of amendments to trade promotion authority, some of them highly problematic for the bill’s ultimate fate. Among those amendments are a bipartisan push to demand that any trade deal address the intentional manipulation of currency rates and a proposal by Senator Elizabeth Warren, Democrat of Massachusetts, to strip from the deal language granting corporations the right to challenge regulations in member nations that harm the value of their investments.

Mr. McConnell promised the Ohio Senators Rob Portman, a Republican, and Sherrod Brown, a Democrat, that he would also give them a vote on Mr. Brown’s amendment to speed the government’s response when industries say foreign competitors are unfairly “dumping” products on the United States market at prices meant to put them out of business.