What follows is a selection of some of the questions the justices grappled with.

Who has the authority to decide the details of immigration policy?

NOEL J. FRANCISCO, THE SOLICITOR GENERAL: It’s up to the executive branch to set it up. It’s up to the executive branch to maintain it. And it’s up to the executive branch to constantly improve it.

Mr. Francisco insisted that the details of immigration policy were for the president to decide.

How much deference is owed a president who harbors animus?

JUSTICE ELENA KAGAN: So let’s say in some future time a — a president gets elected who is a vehement anti-Semite and says all kinds of denigrating comments about Jews and provokes a lot of resentment and hatred over the course of a campaign and in his presidency and, in the course of that, asks his staff or his cabinet members to issue a proc — to issue recommendations so that he can issue a proclamation of this kind, and they dot all the i’s and they cross all the t’s. And what emerges — and, again, in the context of this virulent anti-Semitism — what emerges is a proclamation that says no one shall enter from Israel.

This colorful and provocative question from Justice Kagan cut to the heart of the case. How much deference is owed a president who harbors illegitimate motives for what may be an otherwise permissible policy?

MR. FRANCISCO: But if his cabinet were to actually come to him and say, Mr. President, there is honestly a national security risk here and you have to act, I think then that the president would be allowed to follow that advice even if in his private heart of hearts, he also harbored animus.

Mr. Francisco gave a forthright answer to what he called a very hard question from Justice Kagan.

Did the administration provide enough detail to support its reasons for the travel ban?

JUSTICE SONIA SOTOMAYOR: I thought that the government had kept confidential and refused to share, either with the litigants or the courts, exactly what was done, how, what the evaluation and how —

The administration says the latest travel ban was the result of careful study. Justice Sotomayor pointed out that the underlying report has not been made public.

•

MR. FRANCISCO: First of all, I think that the proclamation is very transparent and lays out in great detail both the process and the substance upon which the proclamation is based. And I think that under the duty of regularity or good faith, or whatever you want to call it, that one branch of the government owes to another coequal branch of the government, there is a very strong presumption that what is being set out there is the truth.

Mr. Francisco responded that the administration had provided a great deal of information about the basis for the latest travel ban and was entitled to considerable deference.

Did the president’s order amount to a ‘Muslim ban’?

MR. FRANCISCO: The first is that the president’s cabinet, just like all of us here, is duty-bound to protect and defend the Constitution. So I would expect that if any cabinet member were given that order, that cabinet member would refuse to comply or resign in the face of a plainly unconstitutional order.

Mr. Francisco said that members of an administration would violate the Constitution by aiding a president in promulgating a discriminatory policy.