Jenny Rey, 3, right, sits on the shoulders of her father, Alejandro Rey of Austin, outside the Supreme Court on April 17. (Matt McClain/The Washington Post)

The conservative justices on the Supreme Court gave little indication Monday that they were inclined to fully revive President Obama’s stalled plan to shield millions of undocumented immigrants from deportation and give them the right to work legally in this country.

Instead, the court’s conservatives and liberals seemed split while hearing a challenge to the plan, and a 4-to-4 tie would leave in place a lower court’s decision that the president exceeded his powers in issuing the directive.

That would close Obama’s presidency with perhaps his biggest legal loss and leave in limbo about 4 million undocumented immigrants whom the initiative was intended to help: those who have been in the country since 2010, have committed no serious crimes, and have family ties to U.S. citizens or others lawfully in the country.

In questions and comments over 90 minutes, the Obama administration did not receive support from Chief Justice John G. Roberts Jr. or Justice Anthony M. Kennedy, seen as most likely among the four conservatives to let the program proceed.

But Monday’s oral arguments may not tell the whole story. Once the justices debate the case behind closed doors, they could be motivated to search for a compromise to avoid the image of a court at an impasse after the February death of Justice Antonin Scalia.

President Obama's executive order would allow more than 4 million undocumented immigrants to stay in the U.S. for three years, but the Supreme Court could strike it down. (Peter Stevenson/The Washington Post)

One possibility might be for the court to recognize the president’s authority to set priorities on whom to deport but to limit the impact of such a designation on an immigrant’s ability to receive work authorization or become eligible for government benefits.

GOP-led states and Republican members of Congress say the president’s November 2014 guidance on deportation states that those with deferred deportation “are lawfully present in the United States.” That term opens a number of opportunities and government benefits to them, according to Texas and 25 other states that have objected to the plan.

But Solicitor General Donald B. Verrilli Jr., representing the administration, denied that the language was legally significant; it would be more accurate to say the government is tolerating their presence, he said.

“If the court thinks it’s a problem and wants to put a red pencil through it . . . it’s totally fine,” Verrilli said.

Roberts tried that out on Erin E. Murphy, a lawyer for the U.S. House of Representatives, who was given time to argue against the administration’s policy.

“Why don’t we just cross out ‘lawfully present,’ as the SG has suggested?” Roberts asked.

“You can’t cross it out and achieve what” the president intends, Murphy said. Whatever one calls it, the administration means for those whose deportations are deferred to be able to legally work and receive government benefits, she said.

1 of 14 Full Screen Autoplay Close Skip Ad × The scene outside Supreme Court during hearing on immigration plan View Photos The court is weighing President Obama’s plan to allow millions of illegal immigrants to remain in the country. Caption The court is weighing President Obama’s stalled proposal to allow millions of illegal immigrants to remain in the United States. April 18, 2016 People gather outside the Supreme Court. Justices are hearing a case challenging President Obama’s plan to give millions of undocumented immigrants the right to work legally. Matt McClain/The Washington Post Buy Photo Wait 1 second to continue.

In the arguments, the court showed a familiar divide in confronting a fundamental tension of Obama’s tenure: whether the president is correctly using the substantial powers of his office to break through political gridlock, or whether he has ignored constitutional boundaries to unilaterally impose policies that should require congressional acquiescence.

[Here’s who will be affected by this immigration case]

But the future of the program depends on who takes Obama’s place. Republican presidential candidates have vowed to revoke it. Democrats have pledged to expand it.

The immigration program, Deferred Action for Parents of Americans and Lawful Permanent Residents (DAPA), would allow illegal immigrants in the affected categories to remain in the country and apply for work permits if they have been here at least five years and have not committed felonies or repeated misdemeanors. Obama announced the executive action in November 2014 after House Republicans did not act on comprehensive immigration reform.

The administration says the program is a way for a government with limited resources to prioritize which illegal immigrants it will deport. As a practical matter, the government has never deported more than 500,000 undocumented immigrants per year and often sends home far fewer than that.

Justice Ruth Bader Ginsburg was in agreement: “Inevitably, priorities have to be set.”

Added Justice Sonia Sotomayor: “So they are here, whether we want them or not.”

That’s correct, Verrilli said, and so the administration decided it would be better to have them be able to work legally.

[400,000 in Los Angeles could be shielded from deportation if justices give green light]

But Kennedy saw the action as doing much more than that. It seemed, he said, “that the president is setting the policy and the Congress is executing it. That’s just upside down.”

And Roberts said the administration saw no limit to Obama’s authority.

“Under your argument, could the president grant deferred removal to every . . . unlawfully present alien in the United States right now?” he asked Verrilli.

“Definitely not,” Verrilli replied.

But Roberts did not seem convinced by Verrilli’s reference to specific undocumented immigrants whom Congress has said must be immediately removed, such as those who have committed crimes or are apprehended at the border.

Texas Solicitor General Scott A. Keller called Obama’s program “an unprecedented, unlawful assertion of executive power” and added that “DAPA would be one of the largest changes in immigration policy in our nation’s history.”

Sotomayor stopped him. “How can you say that?” she asked, noting that previous presidents have also protected specific groups from deportation.

The liberal justices seemed to agree with the administration’s contention that the states have no legal standing to sue, because it is up to the federal government to set immigration policy, and that the Department of Homeland Security did not violate federal statutes in devising the program.

Justice Stephen G. Breyer was most skeptical of Texas’s argument that it had standing to sue because of a state law requiring it to provide driver’s licenses to those authorized to work. He said it could lead to a flood of litigation on other matters.

Verrilli said Texas could be relieved of what it sees as its burden in other ways. But Justice Samuel A. Alito Jr. said the government would insist that the immigrants who receive deferred deportation have access to driver’s licenses if offered to others.

“You would sue them, wouldn’t you?” Roberts asked Verrilli.

At the beginning of the legal fight, U.S. District Judge Andrew S. Hanen agreed with the state that, because it would face a financial cost in providing driver’s licenses to those covered by the new program, Texas had standing to challenge the initiative.

A panel of the U.S. Court of Appeals for the 5th Circuit upheld that decision on a 2-to-1 vote. Circuit Judge Jerry Smith rejected the administration’s argument that DAPA was a form of “prosecutorial discretion” in which a government with limited resources sets priorities for enforcement.

The program, Smith wrote, “is much more than nonenforcement: It would affirmatively confer ‘lawful presence’ and associated benefits on a class of unlawfully present aliens. Though revocable, that change in designation would trigger” eligibility for federal and state benefits “that would not otherwise be available to illegal aliens.”

The court granted time in the arguments to hear from the House of Representatives and from three “Jane Does” from Texas who would be eligible.

Murphy, representing the House, said even Obama did not originally think he possessed the power to take the action.

“Three years ago, the executive asked Congress to enact legislation that would have given it the power to authorize most of the people that are living in this country unlawfully to stay, work and receive benefits, and Congress declined,” she said. “Now the executive comes before this court with the extraordinary claim that it has had the power” all along.

Thomas A. Saenz of the Mexican American Legal Defense and Educational Fund represented the Jane Does.

They “seek the opportunity to apply for discretionary, temporary and revocable relief from the daily fear that they will be separated from their families and detained or removed from their homes under the current nonuniform and frequently arbitrary federal immigration enforcement system,” he said.

The case is U.S. v. Texas .