WASHINGTON — The Supreme Court on Monday seemed sharply divided during an extended argument over a challenge to President Obama’s plan that would shield millions of undocumented immigrants from deportation and allow them to work in the country legally.

A 4-4 deadlock seemed a real possibility, one that would leave in place an appeals court ruling that blocks the plan and deny Mr. Obama the chance to revive it while he remains in office. A tie vote would set no Supreme Court precedent and therefore would allow a renewed challenge to the plan once the court is back at full strength.

Chief Justice John G. Roberts Jr.’s questions were deeply skeptical of the administration’s position. They appeared to signal that he would not join the court’s four more liberal members in dismissing the case on the ground that the challengers had not suffered injuries giving them standing to sue. A ruling based on standing would be a victory for the administration.

The case, brought by Texas and 25 other states, could still produce a significant ruling on presidential power and immigration policy in the midst of an election campaign in which both issues have been prominent.