Dealing a big blow to President Obama's agenda, the House of Representatives failed to pass a key element of a package of bills that would have given Obama the ability to fast-track a trade deal with Pacific Rim nations.

The House began by voting on a bill that would provide funding for training Americans who would lose their jobs because of the trade deal. Failing to attract enough Democratic votes, the body rejected the measure by a large margin.

The House then moved on to the second part of that package and buoyed by Republicans passed a bill giving Obama fast-track approval authority over the Trans-Pacific Partnership (TPP) trade agreement.

The White House called the setback a "procedural SNAFU" — the same language it used when the Senate initially failed to pass the fast-track authority, only to ultimately approve it.

In a statement issued later, President Obama said: "I thank the bipartisan group of Representatives who came together on behalf of America's workers, our businesses, and our economy," he said. "And I urge the House of Representatives to pass TAA as soon as possible, so I can sign them both, and give our workers and businesses even more wind at their backs to do what they do best: imagine, invent, build, and sell goods Made in America to the rest of the world."

The issue here is that both bills have to pass in order for the package to be sent to Obama for his signature. (The Senate has already passed the measure with both provisions, so the House has to match it or go into conference.) In the least, the vote Friday delayed the action on giving Obama fast-track approval.

In a sign of just how important the bill was for the White House, President Obama made a rare personal visit to the U.S. Capitol to lobby for the bill on Friday. But his overtures proved insufficient.

The White House had made the case that the president needed fast-track authority to put the finishing touches on the TPP, which some analysts believe would be the most significant international trade deal in decades.

Critics of the deal — including a large contingent of Obama's own caucus — are opposed to it partly because they believe it will drive American jobs overseas.

Just how contentious is this issue? Right before the House voted on the Trade Adjustment Assistance bill, House Minority Leader and Obama ally Nancy Pelosi said she would not vote in favor of it.

She said this trade deal was not a good deal for American workers and she would not accept giving up the power to make amendments to the trade deal crafted by Obama.

"I will be voting to slow down the fast track," Pelosi said in a strong rebuke of her party's leader.

NPR's Juana Summers reports the House is expected to circle back to the first part of the vote by Tuesday.

Copyright 2016 NPR. To see more, visit