WASHINGTON — Legislation giving President Barack Obama authority to speed trade deals through Congress failed a crucial procedural test on Tuesday, delaying a measure that may be key to Obama’s diplomatic pivot to Asia.

In a setback to the White House trade agenda, the Senate voted 52-45 — eight votes short of the necessary 60 — to clear the way for debate on the legislation, which would allow a quick decision on granting the president so-called fast track authority to move trade deals quickly through Congress.

Massachusetts-bases shoe manufacturer New Balance, which has manufacturing plants in Maine, has said the trade deal’s passage could cause it to cut back its domestic manufacturing. Shoe giant Nike is among those lobbying for removing tariffs on shoe imports from Vietnam.

New Balance officials have said removing the tariffs would make it difficult to compete and could jeopardize 900 jobs at its Maine plants in Norridgewock, Skowhegan and Norway.

The vote marked a big victory for Senate Democratic leader Harry Reid, an outspoken opponent of fast-track.

The failure to garner the necessary votes came after key pro-trade Democrats, including Sen. Ron Wyden of Oregon, announced they would vote no on the procedural vote because the measure lacked some trade protections.

“This is an issue worthy of our consideration and yet today we have voted to not even consider it,” said Senate Majority Leader Mitch McConnell, a Republican.

Only one Democrat, Sen. Tom Carper of Delaware, backed the measure, despite a White House campaign blitz to win Democratic support.

Senate Republicans stuck together in voting to let the bill pass its first test. However, McConnell at the last minute switched his vote to “no” in a procedural move that lets him bring the bill to a vote again in the future.

The legislation would give lawmakers the right to set negotiating objectives but restrict them to a yes-or-no vote on trade deals such as the 12-nation Trans-Pacific Partnership (TPP), a potential legacy-defining achievement for Obama.

Maine’s senators were split on the vote to move ahead with debate.

Republican U.S. Sen. Susan Collins said she voted to continue debate because the bill included an extension of trade adjustment assistance that she co-authored with Wyden, the Oregon Democrat who voted against the bill. That program provides assistance to workers who lost their jobs as a result of foreign competition.

“My vote should not be construed as signifying support for either Trade Promotion Authority or the Trans-Pacific Partnership,” Collins said in a news release. “I remain very skeptical about granting the president TPA as it paves the way for TPP, which could in turn threaten many American jobs.”

Independent U.S. Sen. Angus King voted against proceeding to debate on the bill, arguing that Congress should have the ability to review the details of the deal.

“Giving the president the authority to fast-track an agreement before Congress has even had the opportunity to review and understand what’s in it would effectively stifle the voices of those who it will impact the most, and that’s not fair,” King said in a news release.

Failure sends a worrying signal about the level of support for fast track, which unions, environmental and consumer groups strongly oppose, along with some conservatives.

It may also reflect congressional maneuvering tactics after Reid demanded that the Senate first consider the imminent expiration of federal transportation construction projects and a domestic surveillance program.

Republicans could now work on the transportation and surveillance bills and then try again on trade at some time in the future.

The TPP would create a free trade zone covering 40 percent of the world economy — making it the biggest trade deal since the North American Free Trade Agreement liberalized trade between the United States, Canada and Mexico.

More than two decades later, that pact is blamed by many on the left for factory closures and job losses and has soured sentiment toward the TPP.

Although the administration pointed to research saying export-related jobs pay up to 18 percent more than other jobs, other studies showed that increased competition from imports has cut wages and caused job losses in U.S. manufacturing.

Negotiations on the TPP are nearly complete, but trading partners have said they want to see fast-track legislation enacted before finalizing the pact, which will stretch from Japan to Chile.

Additional reporting by Susan Cornwell.