The two lawyers presented sharply contrasting accounts of what the Arizona law meant to achieve.

Mr. Clement said the state was making an effort to address a crisis by passing a law that complemented federal immigration policy. “Arizona borrowed the federal standards as its own,” he said, adding that the state was simply being more assertive in enforcing federal law than the federal government. Mr. Verrilli countered that Arizona’s approach was in conflict with the federal efforts. “The Constitution vests exclusive authority over immigration matters with the national government,” he said.

Mr. Verrilli, whose performance in the health care case was sometimes halting and unfocused, seemed on Wednesday occasionally to frustrate justices who might have seemed likely allies. At one point Justice Sotomayor, addressing Mr. Verrilli by his title, said: “General, I’m terribly confused by your answer. O.K.? And I don’t know that you’re focusing in on what I believe my colleagues are trying to get to.”

The Arizona law advances what it calls a policy of “attrition through enforcement.” The Obama administration sued to block the law, saying it could not be reconciled with federal laws and policies. In legal terms, the case is about whether federal law “pre-empts,” or displaces, the challenged state law.

As a general matter, federal laws trump conflicting state laws under the Constitution’s supremacy clause. But no federal law bars the challenged provisions of the Arizona in so many words, and the question for the justices is whether federal and state laws are in such conflict that the state law must yield.

Last year, a three-judge panel of the United States Court of Appeals for the Ninth Circuit, in San Francisco, blocked four provisions of the law on those grounds.

Most of the argument on Wednesday concerned the part of the law requiring state officials to check immigration status. Several justices said states were entitled to enact such provisions, which make mandatory inquiries to federal authorities from local police officers that are already commonplace.