Follow CBSDFW.COM: Facebook | Twitter

BROWNSVILLE (CBSDFW.COM/AP) – A federal judge in South Texas on Monday temporarily blocked President Barack Obama’s executive action on immigration just a day before it was to go into effect, giving a coalition of 26 states time to pursue a lawsuit that aims to permanently stop the orders.

READ MORE: Traveling Outside The US? Check Out The New COVID-19 Testing Policy You Need To Know

U.S. District Judge Andrew Hanen’s decision comes after a January hearing in Brownsville, and puts on hold Obama’s orders that could spare as many as 5 million people who are in the U.S. illegally from deportation.

Hanen wrote in a memorandum accompanying his order that the lawsuit should go forward and that without a preliminary injunction the states will “suffer irreparable harm in this case.”

“The genie would be impossible to put back into the bottle,” he wrote, adding that he agreed with the plaintiffs’ argument that legalizing the presence of millions of people is a “virtually irreversible” action.

The federal government is expected to appeal the ruling to the 5th U.S. Circuit Court of Appeals in New Orleans.

In a statement early Tuesday, the White House defended the executive orders issued in November as within the president’s legal authority, saying the U.S. Supreme Court and Congress have said federal officials can establish priorities in enforcing immigration laws.

“The district court’s decision wrongly prevents these lawful, commonsense policies from taking effect and the Department of Justice has indicated that it will appeal that decision,” the statement said.

READ MORE: Average US Price Of Gasoline Drops 2 Cents Over 2 Weeks, To $3.46

The first of Obama’s orders – to expand a program that protects young immigrants from deportation if they were brought to the U.S. illegally as children – was set to start taking effect Wednesday. The other major part of Obama’s order, which extends deportation protections to parents of U.S. citizens and permanent residents who have been in the country for some years, was not expected to begin until May 19.

In a statement late Monday, Governor Greg Abbott praised the court’s decision and said it upholds the rule of law.

“President Obama abdicated his responsibility to uphold the United States Constitution when he attempted to circumvent the laws passed by Congress via executive fiat,” Abbott said.  “Judge Hanen’s decision rightly stops the president’s overreach in its tracks.”

But the Texas Organizing Project, which supports the president’s immigration plan, calls the decision a “temporary setback.”

“It does not change the fact that the president’s executive order is a victory for immigrant families,” said Joaquin Guerra, the group’s political director.  “We call on the Department of Justice to immediately file for a stay at the Fifth Circuit Court of Appeals so it can reject this meritless lawsuit that is an attack on immigrant families and a waste of taxpayer dollars.”

CBS 11 News political reporter Jack Fink contributed to this report. You can follow him on Twitter at @CBS11Jack.

MORE NEWS: Santa Touring Neighborhoods On Murphy Fire Engine

(©2015 CBS Local Media, a division of CBS Radio Inc. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)