President Barack Obama’s executive action to shield millions of undocumented immigrants from deportation suffered a legal setback on Monday with an appeal to the Supreme Court now the administration’s only option.

The 2-1 decision by the 5th U.S. Circuit Court of Appeals in New Orleans to uphold a May injunction deals a blow to Obama’s plan, opposed by Republicans and challenged by 26 states.

The states, all led by Republican governors, said the federal government exceeded its authority in demanding whole categories of immigrants be protected.

The Obama administration has said it is within its rights to ask the Department of Homeland Security to use discretion before deporting nonviolent migrants with U.S. family ties.

The case has become the focal point of the Democratic president’s efforts to change U.S. immigration policy.

Seeing no progress on legislative reform in Congress, Obama announced last November he would take executive action to help immigrants. He has faced criticism from Republicans who say the program grants amnesty to lawbreakers.

In its ruling, the appeals court said it was denying the government’s appeal to stay the May injunction “after determining that the appeal was unlikely to succeed on its merits.”

Republicans hailed the ruling as a victory against the Obama administration.

Steve Scalise, the No. 3 Republican in the House of Representatives, said in a Twitter message that the court decision was “a major victory for the rule of law.”

Texas Attorney General Ken Paxton said in a statement the ruling meant the state, which has led the legal challenge, “has secured an important victory to put a halt to the president’s lawlessness.”

(The story was refiled to correct the first name for Representative Scalise in next to last paragraph)