WASHINGTON — In one fell swoop Tuesday, Senate Democrats successfully blocked President Obama's trade legislation and handed him one of his biggest defeats in recent memory.

A senior Senate Republican leadership aide said Obama and Majority Leader Mitch McConnell spoke Monday about the status of the bill, and during that conversation McConnell warned the president that he "needed to get it together" and whip members of his party if the bill was to avoid a filibuster.

But less than 24 hours later, even Democrats who supported the bills were bailing.

Ostensibly unhappy with the procedures under which the Senate was considering the package of trade deals and sweeping new authority for the president to sign agreements, a group of pro-trade Democrats unexpectedly broke with the administration, siding with Senate Majority Leader Harry Reid and opponents of the legislation.

Even Sen. Ron Wyden, who is a manager of the trade bills and was tasked with moving the legislation through the Senate, bucked the administration — much to the delight of Republicans.

"What you're going to see here is a failure of a president … to produce enough votes," Senate Majority Whip John Cornyn told reporters, while Senate Republican Conference Chairman John Thune argued Senate Democrats are "throwing their own president under the bus."

Sen. Rob Portman — who has also served in the House and was former President George W Bush's United States Trade Representative — said it's unheard of for a president's party to abandon him to this extent. "Look, I've never seen the leader of the president's party stop the president's top priority on a procedural matter … the idea is you're supposed to carry the water, at least on process."

Senate Democrats, however argued it's not the presidents fault. "I don't think it's a reflection on the president ... I think it's just a difference if views" on trade, said Senate Foreign Relations ranking member Ben Cardin said after the vote.

Connecticut Democrat Sen. Chris Murphy also downplayed Obama's ability to move the trade bills, arguing trade has simply become too difficult of an issue for many Democrats.

"Democrats have always been all over the map on trade, and trade isn't getting any easier, these trade agreements aren't getting any easier to support as the middle class continues to get eviscerated in many of our states. So I think the natural flow of the economy and evaporation of the middle class is making it harder for members to support these deals, not withstanding the efforts of the [President]," Murphy said.

Meanwhile Sen. Sherrod Brown, one of the most active opponents to the current effort to push through the trade package, praised the filibuster.

"Senate Democrats stood united and demanded a full and thorough debate of trade policy. We cannot rush through the largest trade deal ever while leaving American workers and manufacturers behind," Brown said.

Tuesday's failed vote is a victory for unions, activists, and progressive lawmakers who have mounted an aggressive opposition campaign against the White House's efforts to push through a "fast track" that would allow the president to negotiate trade deals and give Congress a simple up-or-down vote.

In recent weeks, the Obama administration has made a concerted effort to break the broad progressive opposition to their trade agenda. Those efforts have not deterred the opposition.

The mostly behind-the-scenes intra-party battle has spilled out in the open at times, with President Obama on Saturday forcefully responding to Sen. Elizabeth Warren's vocal opposition to his trade deal.

"The truth of the matter is that Elizabeth is, you know, a politician like everybody else," Obama said in an interview with Matt Bai of Yahoo News. "And, you know, she's got a voice that she wants to get out there, and I understand that. And on most issues, she and I deeply agree. On this one, though, her arguments don't stand the test of fact and scrutiny."