(CNN) -- In a stinging defeat after months of negotiations, senators on Thursday failed to advance a bipartisan proposal to resolve the future of millions of young undocumented immigrants, leaving talks seemingly back at square one.
A much-anticipated bipartisan deal that would have paired a pathway to citizenship for nearly 2 million undocumented immigrants who came to the US as children with $25 billion in border security and some other measures failed to get the 60 votes necessary to advance legislation after furious White House opposition.
The vote was 54-45.
A competing White House-backed plan that would have also substantially increased federal deportation powers, heavily cut family-based legal migration and ended the diversity visa also failed, 39-60.
The episode, coming at the end of a much-anticipated Senate week of debate on immigration, revealed that the White House was able to kill momentum for a deal that had emerged out of weeks of talks by roughly 20 bipartisan senators -- but that it also had no ability to enact any legislation to achieve its stated goal of protecting the recipients of the Deferred Action for Childhood Arrivals program, which President Donald Trump is ending, and increasing border security measures along with it.
Sen. John Thune said it's "back to the drawing board."
"Well, we'll go back to the drawing board, come up with a solution. I've got a proposal that maybe we'll get a shot at one of these days, too, so. We've gotta fix the issue, address the DACA problem and do something about the border," Thune, R-South Dakota, told CNN's Sunlen Serfaty.
Trump called the bipartisan bill "a total catastrophe," tweeting that "Voting for this amendment would be a vote AGAINST law enforcement, and a vote FOR open borders."
Attorney General Jeff Sessions also derided the legislation, saying it "will invite a mad rush of illegality across our borders," and Homeland Security Secretary Kirstjen Nielsen made calls to lawmakers urging them to reject the bill.
Sen. Tom Cotton, an Arkansas Republican, said on the Senate floor that the plan would be called the "olly olly oxen free amendment."
The legislation from a group of 16 bipartisan senators would offer nearly 2 million young undocumented immigrants who came to the US as children before 2012 -- like those protected under DACA -- a path to citizenship over 10 to 12 years.
The plan would also place $25 billion in a guarded trust for border security, would cut a small number of green cards each year for adult children of current green card holders, and would prevent parents from being sponsored for citizenship by their US citizen children if those children gained citizenship through the pathway created in the bill or if they brought the children to the US illegally.
Sen. Susan Collins said she was "very disappointed" as she left the chamber.
"I fear we're going to end up with nothing getting 60 votes. And so we've got real problems that we need to solve," the Maine Republican told reporters.
"I think it has to come back because the March deadline, but I don't know in what form or how," she added, referring to Trump's move to end DACA on March 5, although that plan is currently blocked in the courts.
Senate Majority Whip John Cornyn, a Republican from Texas, told reporters he does not see the issue of immigration being raised again soon.
"I thought the deadline and I thought the empathy that people have for these young people would be enough to change the outcome here, but apparently not yet," Cornyn said.
Republican Sen. John Kennedy of Louisiana, who voted against the bipartisan amendment, said he doubts Congress will return to immigration after it gets back from next week's recess.
"I'm ready to move on. We wasted a whole week here. And I'm ready to move on. There are other issues in front of us."
He was very critical of leadership for the way this was all handled.
"I'm disappointed, maybe I was naïve, but I believed we were going to be able to take an instrument, offer unlimited number of amendments, work through the evenings and weekends. ... That's not what happened. We were limited in what we could vote on. And we wasted a whole week. There was virtually no debate. There was less than an hour of debate."
Senators peeved at White House
Senators who backed the immigration negotiations were unhappy at the White House's response.
Sen. Lisa Murkowski, a Republican from Alaska who's a sponsor of the bipartisan immigration amendment, said before the votes that she had been disappointed with the White House's approach in the last several days.
"I fear that you've got some within the White House that have not yet figured out that legislation almost by its very definition is a compromise product, and compromise doesn't mean getting four Republicans together and figuring out what it is that those four agree on: It is broader," Murkowski said.
"To now be in a position where we're going to be voting sometime today and to have the response coming out of the White House as it is is discouraging," she said. "Basically, everybody loses."
Sen. Lindsey Graham, R-South Carolina, told reporters, "I'm looking for leadership from the White House, not demagoguery."
Graham directed a message to the President himself: "There's a deal to be had there, President Trump, just you need to lead us to that deal. You need to understand that there's nobody better to do this than you, but to the administration if you continue this attack on everything and everybody and make it a political exercise, we're doomed to fair, and it is President Trump's presidency that will be the biggest loser."
Trump plan rejected
Trump had explicitly endorsed a measure from Sen. Chuck Grassley, R-Iowa, that encapsulates the White House's desired immigration results.
That bill includes a pathway to citizenship and money for security but also significant limits to legal immigration, including family-based migration and the diversity visa lottery.
"If Dems are actually serious about DACA, they should support the Grassley bill!" Trump tweeted Thursday.
Murkowski lamented that the White House won't look beyond the Grassley measure.
"The White House has made its decision. They say that Grassley is the bill they're going to support. Period," she said. "I think that's unfortunate, because I don't think that Grassley is going to get the votes that it needs, and as a consequence the bipartisan product might not get the votes that it needs."
That amendment failed 39-60.