The Supreme Court heard arguments on Wednesday in Trump v. Hawaii, one of several cases challenging President Trump’s third travel ban. After two earlier travel bans were partially or fully struck down by federal courts, President Trump imposed the current travel ban. The third travel ban targets foreign nationals from seven Muslim-majority countries who seek to enter the United States as immigrants or for temporary stays. This week’s arguments come after the Supreme Court allowed the third travel ban to take effect while the present appeal was pending.

During oral arguments, the justices grappled with several questions. First, do courts have the power to rule on a president’s decision to ban the entry of certain groups on national security grounds? If the answer is yes, the justices will then have to decide whether the travel ban is actually a “Muslim Ban.” And if so, they will need to determine whether it violates the First Amendment’s Establishment Clause, which prohibits the federal government from discriminating on the basis of religion.

The Court will also have to decide if President Trump exceeded the authority Congress gave him to designate “classes” of individuals who can be denied entry, and whether the lower courts’ decisions to block the travel ban were too broad.

Arguing first for the government, Solicitor General Noel Francisco emphasized that the travel ban was not a “Muslim ban,” but instead adopted for legitimate national security reasons after a “worldwide multi-agency review” recommended that the president ban entry from countries that did not share certain information with the United States.

Justices Ginsburg and Sotomayor were quick to question Francisco on whether the president could invoke immigration law to justify a national security-based ban. They pointed out that Congress had already imposed heightened visa restrictions for countries that did not share information on their residents. In response, Francisco argued that the president had the authority to impose stronger restrictions than Congress.

Francisco also insisted that the courts may not consider any of President Trump’s campaign statements calling for a Muslim ban. Justice Kennedy questioned this assertion, pushing Francisco on whether he truly believed that campaign statements were always “irrelevant.”

The justice posed a hypothetical where a local mayor made “hateful statements” during his campaign and then “on day two [after being elected], he takes acts that are consistent with those hateful statements.” Francisco then argued that taking the oath of office “marks a fundamental transformation” from private citizen to elected official, and so all campaign statements should be out of bounds.

In response to a hypothetical question from Justice Kagan about whether he would argue the same if a known anti-Semite was elected president and then banned entry from Israel, Francisco indicated that such a ban might be unconstitutional. He denied, however, that the hypothetical situation was similar to the current ban.

Lawyer Neal Katyal argued for the State of Hawaii next, emphasizing the unprecedented nature of the travel ban—no president in U.S. history has ever enacted such a large-scale entry ban.

He implored the judges not to accept the government’s arguments that the president has near-unlimited power to ban entry, arguing that this would give the president the power to unilaterally restore the nationality-based quota system that Congress eliminated in 1965.

Katyal also pushed back strongly at arguments from several justices who tried to compare the travel ban to more limited visa restrictions put in place by President Carter during the Iran hostage crisis, and a brief entry ban for Cuban nationals put in place by President Reagan in 1986 after Cuba broke a migration agreement.

Throughout the arguments, Justices Kennedy and Roberts—both of whom are thought to be possible swing votes on this issue—seemed troubled with the idea that courts could second-guess the president on national security. Justice Roberts questioned whether a finding that the travel ban was a “Muslim ban” might lead to other court challenges for any action President Trump took that targeted Muslims, including air-strikes in Syria.

Justice Gorsuch remained largely silent. He noted that the Court rarely overturns laws on Establishment Clause grounds and indicated that he might find that the lower court was wrong to issue a nationwide injunction.

While the justices deliberate, the ban will remain in full force. The only individuals allowed in under the ban are those who qualify for a “waiver” under the ban.

However, at oral arguments, the government admitted that only a handful of individuals had been granted waivers. One particularly troubling waiver denial that came up was the rejection of a 10-year-old Iranian girl who suffers from cerebral palsy, with both Justices Breyer and Ginsburg citing her case to express concern that the waiver process itself was flawed.

A decision for Trump v. Hawaii is expected in June.