For the second time in as many months, a federal judge has barred the Trump administration from ending the Obama-era DACA program next month.

U.S. District Judge Nicholas Garaufis in New York ruled Tuesday that Attorney General Jeff Sessions had "erred in concluding that DACA is unconstitutional" and granted a preliminary injunction sought by state attorneys general and immigrants who had sued the administration.

The Justice Department had no immediate comment on Garaufis' ruling.

Last month, U.S. District Judge William Alsup in San Francisco ruled that DACA must remain in place while litigation surrounding the program is ongoing. The U.S. Supreme Court is currently considering whether to take up the Trump administration's appeal of that ruling.

The ruling came down as debate in the Senate on immigration reform struggled to gain traction, with Republican and Democratic leaders immediately at loggerheads over how to move forward and President Donald Trump warning this was the "last chance" to extend protections to "Dreamer" immigrants.

Trump announced this past September that he was ending the DACA, or Deferred Action for Childhood Arrivals, program. The move gave Congress a March 5 deadline to create a legislative replacement for the program, but was almost immediately challenged in court.

The White House has sought increased funding for border security, including a wall across the U.S.-Mexico border, in exchange for providing a path to citizenship for 1.8 million immigrants.

Senate Majority Leader Mitch McConnell, R-Ky., began the process with a proposal allowing Republicans to bring up an amendment targeting cities that don't fully cooperate with federal immigration authorities, so-called "sanctuary cities." Then, Democrats would bring up legislation of their choosing. Amendments gaining 60 votes would become part of the broader immigration bill.

The Senate's top Democrat, Chuck Schumer of New York, quickly objected.

"To begin the debate as the Republican leader suggests would be getting off on the wrong foot," Schumer said. "Very partisan."

Schumer wants McConnell to bring up legislation that incorporates Trump's priorities and a second, much narrower bill from Sens. John McCain, R-Ariz., and Chris Coons, D-Del.

His reasoning: The legislation Schumer wants considered would address the population of young immigrants that lawmakers from both parties say they want to help, rather than side issues such as how to deal with sanctuary cities.

McConnell replied: "I'm not trying to dictate to them what they offer. They shouldn't be trying to dictate to us what we offer. We ought to just get started."

The disagreement means there could be several more hours of speeches before any votes occur. That gives a group of moderate lawmakers more time to come up with a package that could generate 60 votes in the Senate.

Still, many Republicans are insisting that the bill incorporating Trump's priorities is a compromise.

"The president's framework is not an opening bid in negotiations. It is a best and final offer," said Sen. Tom Cotton, R-Ark.

In a meeting with sheriffs at the White House, Trump continued to frame the debate in a way that depicts many of the illegal immigrants seeking to enter the U.S. as dangerous criminals.

"We're asking Congress to support our immigration policy that keeps terrorists, drug dealers, criminals and gang members out of our country. We want them out. We don't want them in and right now we're working on DACA, we're working on immigration bills and we're making them tough," Trump said.

Fox News' Jake Gibson and The Associated Press contributed to this report.