In a dramatic defeat for the White House, President Obama's trade agenda ran aground in the House on Friday as Democrats banded together in opposition despite a personal plea from the president.

In a 302-126 vote, the House killed a worker aid bill that was tied to the president's main agenda item -- legislation that would give Obama "fast-track" authority to negotiate trade deals. Without it, the trade push withers for now. The vote marked a stunning blow for the president at the hands of his own party, with Nancy Pelosi and labor unions helping drive the stake into the legislation in the end.

Minutes before the vote, Pelosi took to the floor to appeal for a "better deal" for American workers.

Afterward, White House Press Secretary Josh Earnest called the vote a "procedural snafu," downplaying the drama and voicing hope that a bipartisan majority could eventually be reached. "These kinds of entanglements are endemic to the House of Representatives," Earnest said.

But the margin of defeat Friday was already raising questions about how Obama might be able to persuade more Democrats.

The key vote Friday was on the so-called Trade Adjustment Assistance bill, a program that retrains workers displaced by trade. The bill was originally put on the table as a sweetener to help get Democrats on board and ultimately move the "fast-track" bill. But Democrats are so opposed to that legislation, all but 40 opposed the sweetener.

The biggest defection for Obama came when Pelosi joined the rebellion in opposing TAA. Though she supports the worker aid, she said voting against it was the only way to "slow down the fast track."

She said the main trade bill would be "stuck in the station" without TAA.

Indeed, the president's entire trade plan is in question. The House did hold a symbolic vote and approved the "fast-track" legislation moments after the TAA measure failed. The 219-211 vote showed the trade bill technically had enough support. But under the rules in effect, the overall legislation, previously approved by the Senate, could not advance to the White House unless both halves were agreed to.

House Republican leaders, who have been Obama's biggest supporters on the trade issue, said after the vote they could try again next week.

"We are not done with it," House GOP Leader Kevin McCarthy, R-Calif., said. "We need to finish this job."

Rep. Paul Ryan, R-Wis., praised the Republicans and "pro-trade Democrats" who "kept their word" and backed the measures Friday. He said Obama still has work to do getting more Democrats on board, but, "This isn't over yet."

But one senior House GOP aide told Fox News the Democrats would need to have a "wholesale change of heart" to bring the legislation back so quickly.

The vote came after Obama paid a rare Capitol Hill visit, meeting with Democrats in a bid to ease their concerns. Obama, though, was unable to calm the rebellion in the ranks on an issue that has created unusual alliances -- with congressional Republican leaders his biggest defenders on trade, and rank-and-file Democrats his biggest foes, worried about the impact the legislation could have on jobs.

The "fast-track" power he seeks, known as Trade Promotion Authority, would give the president the authority to negotiate trade deals that Congress could approve or reject, but not amend. Obama hoped to use the authority to complete a sweeping pact with 11 other Pacific Rim nations which would constitute the economic centerpiece of his second term.

Obama says such a pact with Japan, Mexico, Singapore and other nations constituting 40 percent of the global economy would open up critical new markets for American products.

Republicans continued to stand in Obama's corner on Friday.

"Is America going to shape the global economy, or is it going to shape us?" said Ryan, the Wisconsin Republican who is head of the House Ways and Means Committee and a GOP pointman on an issue that scrambled the normal party alignment in divided government.

But Rep. Sander Levin, D-Mich., countered that the legislation included "no meaningful protections whatever against currency manipulation" by some of America's trading partners, whose actions he said have "ruined millions of middle class jobs."

Fox News' Chad Pergram and The Associated Press contributed to this report.