For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

If President Donald Trump can ban people from majority-Muslim countries from entering the United States, could an anti-Semitic president ban all residents of Israel from coming?

That was among the tough questions the Supreme Court’s liberal justices posed to the Trump administration as it defended its travel ban on Wednesday. And the lawyer representing the government was put in the uncomfortable position of answering yes.

Wednesday’s arguments over the legality of the travel ban marked the first time in which the court will rule on a key Trump policy. The ban, which Trump enacted via an executive order in September, prevents around 150 million people from seven countries, most with a Muslim majority, from entering the United States. Hanging over the justices’ deliberations were the president’s statements about Muslims during his 2016 campaign, when he pledged to ban all Muslims from coming to the country. Opponents of the travel ban have argued that those comments suggest the travel ban is really Trump’s Muslim ban in disguise and should be struck down as discriminatory.

The unusual nature of the case led the justices to pose a series of hypotheticals to the government’s lawyer, Solicitor General Noel Francisco. The first came from Justice Elena Kagan, who posited a future scenario in which someone campaigns for president as a virulent anti-Semite. Once in office, the new president asks his Cabinet to help him design a new travel ban. “What emerges is a proclamation that says, ‘No one shall enter from Israel,'” she imagines. Can such a ban pass constitutional muster?

Francisco replied that if the Cabinet said, “There is honestly a national security risk here and you have to act,” then the president “would be allowed to follow this advice, even if in his private heart of hearts he also harbored animus.”

The hypothetical gets at the heart of the constitutionality of the travel ban, and whether the president, after calling for a “total shutdown” of Muslims entering the country, can persuade the justices that his ban does not discriminate on the basis of religion.

“Campaign statements” are made by “private citizens,” Francisco argued. There is a “fundamental transformation” from candidate to president, and only the comments of the sitting president would trigger constitutional questions.

Justice Anthony Kennedy, often the swing justice on contentious cases, chimed in with another hypothetical. “Suppose you have a local mayor, and as a candidate he makes vituperative, hateful statements,” he said. “He’s elected, and on day two he takes acts that are consistent with those hateful statements. Whatever he said during the campaign is irrelevant?” Francisco replied, “I would say yes,” because the government believes that the oath of office “marks a fundamental transformation.”

The outcome of the case could hinge on Kennedy’s interest in the questions raised by these hypotheticals involving the First Amendment’s prohibition on government actions that favor certain religions over others. At oral arguments, the liberal justices appeared skeptical of the ban, and the conservatives appeared poised to support it. Only Kennedy seemed undecided. Once again, the fate of one of the country’s most controversial policies is likely to come down to him.