WASHINGTON (AP) -- President Barack Obama's trade agenda cleared a key Senate hurdle and advanced toward likely passage on Thursday despite opposition from most Democrats.

The 62-38 vote capped a long, tense roll call on a measure that would allow Obama to negotiate trade deals that Congress can accept or reject, but not change. If opponents had garnered three more votes, they would have been able to block the legislation with a procedural move.

With Republicans generally in favor of the measure, the pivotal votes came from Sen. Maria Cantwell, D-Wash., and a handful of others who support the trade measure. They used the showdown as leverage for a commitment that the Senate would act next month on legislation to keep the Export-Import Bank in existence. The government-backed bank guarantees loans for overseas sales by U.S. companies.

The bank's legal authority expires June 30, and conservatives in the House are seeking to put it out of business.

Obama and major business groups worked in the final hours to help secure the needed Senate votes on trade. Obama made phone calls late Wednesday night to Democratic senators including Cantwell and Ron Wyden of Oregon, the top Democrat handling the trade legislation.

In an interview with The Associated Press, Cantwell said she spoke several times in the past 24 hours to Obama, and "the president now is very committed to making this part of the entire trade package," referring to the Export-Import Bank.

"... I think now they understand the timeliness of the June 30 expiration, that there are deals that are pending, and that no one wants to put these important opportunities that hard-working American businesses have secured ... at jeopardy," Cantwell said.

Leaders of the Business Council met early Thursday with Democratic Senate leaders. They included Boeing chief executive James McNerny, a strong supporter of reauthorizing the Ex-Im Bank, said Sen. Dick Durbin of Illinois. Durbin, the Senate's second-ranking Democrat, said the Ex-Im Bank was among the topics discussed.

Durbin said the agreement to allow a Senate vote on the Ex-Im Bank in June was crucial to Thursday's outcome.

Sen. Bill Nelson, D-Fla., told reporters that Cantwell "feels very strongly, as we do, about the Export-Import Bank getting a clear path, that there would be a vote soon on Export-Import. She was given that assurance by Sen. McConnell, and she immediately turned and voted aye."

Sen. Mitch McConnell, R-Ky., is the Senate majority leader.

House Speaker John Boehner, R-Ohio, said Cantwell asked him for a guarantee that the House also will vote on whether to reauthorize the Ex-Im Bank, but "I told her I would not make that commitment."

The White House seeks the trade legislation to improve prospects for a treaty under negotiation with 11 other Pacific Rim nations. Supporters say a deal would boost U.S. exports and create jobs for an economy still not showing full strength.

But labor unions and other groups vital to Democrats strongly oppose Obama's trade agenda. They say free-trade deals cost U.S. jobs.

There were 49 Republicans and 13 Democrats who voted to advance the measure Thursday. Another 31 Democrats, two independents and five Republicans opposed.

The trade agenda is among Obama's highest second-term priorities. Support was thought to be greater in the Senate than in the House, which is awaiting trade action, so a Senate defeat would have been especially embarrassing.

Wyden told reporters, "We had two big issues that we basically worked through the night on" Wednesday. They were the Ex-Im Bank and the number of types of amendments senators can offer to the trade bill.

Some Ex-Im Bank critics say the bank offers unnecessary help to huge corporations. A bank spokesman said that in fiscal year 2014, its authorizations for small-business transactions exceeded $5 billion, or nearly a fourth of the total value of all authorizations.

The politics of trade have been strange from the start. Republican lawmakers generally support expanded trade deals, but many are loath to give Obama any new victories.

Most congressional Democrats and key liberal groups oppose new trade deals. But an uncertain number of House and Senate Democrats support Obama on trade, and the White House has lobbied heavily to expand that group.

Senate critics are attacking the fast-track bill from many sides. Some demand crackdowns on countries that make their exports more affordable by keeping the currency artificially low.