The case hinged in part on whether Texas had suffered the sort of direct and concrete injury that gave it standing to sue. Texas said it had standing because it would be costly for the state to give driver’s licenses to immigrants affected by the federal policy.

Chief Justice Roberts is often skeptical of expansive standing arguments. But it seemed plain when the case was argued in April that he was satisfied that Texas had standing, paving the way for a deadlock.

Mr. Obama said the White House did not believe the terse ruling from the court had any effect on the president’s authority to act unilaterally. But he said the practical effect would be to freeze his efforts on behalf of immigrants until after the November election.

He also predicted that lawmakers would eventually act to overhaul the nation’s immigration system.

“Congress is not going to be able to ignore America forever,” he said. “It’s not a matter of if; it’s a matter of when. We get these spasms of politics around immigration and fear-mongering, and then our traditions and our history and our better impulses kick in.”

White House officials had repeatedly argued that presidents in both parties had used similar executive authority in applying the nation’s immigration laws. And they said Congress had granted federal law enforcement wide discretion over how those laws should be carried out.

But the court’s ruling may mean that the next president will again need to seek a congressional compromise to overhaul the nation’s immigration laws. And it left immigration activists deeply disappointed.