President Donald Trump's travel ban was argued before the Supreme Court on Wednesday, and appeared to have the backing of a majority of the justices.

The court will decide whether Trump has the authority to broadly restrict travel to the US and whether the ban violates the Constitution's establishment clause.

The justices are expected to issue a ruling in June.

President Donald Trump's travel ban — one of the most controversial executive orders to come from his presidency so far — appears to have the backing of a majority of Supreme Court justices who heard oral arguments on Wednesday morning.

The court considered the third iteration of Trump's ban, which he issued in September, after lower courts struck down each of Trump's previous two versions.

During the arguments, two of the most closely watched justices — Chief Justice John Roberts and Justice Anthony Kennedy — appeared amenable to the government's arguments that Trump has the authority to impose travel restrictions due to national security concerns.

The third ban imposed restrictions on travelers coming to the United States from Syria, Iran, Yemen, Somalia, Libya, Chad, North Korea, and Venezuela. But the plaintiffs didn't include North Korea and Venezuela in their challenge, and the Trump administration removed Chad from the list in recent weeks.

At issue in the case, Trump v. Hawaii, are two main questions:

whether Trump has the authority under federal immigration law to implement such travel restrictions, and whether the travel ban violates the Constitution's establishment clause, which prohibits the government from favoring one religion over another.

The Supreme Court posted audio of the oral arguments on its website Wednesday afternoon, a rarity, because the case has such a high profile. The justices are expected to issue a ruling in June.

What the Trump administration argued

Trump signing the second version of his travel ban on March 6, 2017. Sean Spicer/Twitter The Trump administration argued on Wednesday, as it did with the previous two travel bans, that Trump has "broad authority" to restrict travel to the US over national security and terrorism concerns.

"The proclamation reflects a foreign policy and national security judgment that falls well within the president's power," Solicitor General Noel Francisco, who was arguing on behalf of the Trump administration, told the justices.

Francisco also argued that the ban does not discriminate against Muslims, as it does not apply to "the vast majority of the Muslim world."

Instead, Francisco argued, the travel ban only applied to countries that "failed to provide the minimum baseline of information needed to vet their nationals," and exerted diplomatic pressure on those countries to improve their data collection practices.

The Trump administration also said the travel ban has precedent, because previous presidents have issued executive orders restricting travel from certain countries during international conflicts or other national security crises.

The government cited decisions from Jimmy Carter, who restricted travel from Iran during the hostage crisis in 1980, and Ronald Reagan, who restricted travel from Cuba in 1985.

Attorney General Jeff Sessions issued a statement Wednesday morning saying the Justice Department looked forward to defending the ban before the top court on Wednesday, and emphasized that federal law and the Constitution grant Trump "broad discretion and authority" to act against perceived threats to national security.

"After multiple agency heads conducted a comprehensive, worldwide review of foreign governments’ information-sharing practices and other risk factors, President Trump determined this travel order is critical to protecting the American people," Sessions said. "President Trump has been steadfast in his commitment to the safety and security of all Americans."

What the challengers argued

People gather to protest President Donald Trump's travel ban in front of the Supreme Court, on April 25, 2018. Getty Images/Mark Wilson

The challengers — which include the state of Hawaii, the Muslim Association of Hawaii, and two unidentified plaintiffs — argued that Trump's third version of the ban essentially does the same as the previous two: discriminates against Muslim travelers in an effort to fulfill Trump's 2016 campaign proposal to bar Muslims from entering the country.

"It's unconstitutional. It's unnecessary. And most of all, it's un-American," Neil Katyal, who was representing the plaintiffs on Wednesday, argued.

Plaintiffs also cited not only the previous two travel bans but Trump's 2016 campaign rhetoric and multiple tweets during his presidency that they see as evidence Trump has religious animosity toward Muslims.

Justice Kennedy, who is frequently the swing vote in cases with a clear liberal-conservative split, had several tough questions for the plaintiffs on how they viewed the president's authority under federal immigration law.

Though Katyal argued that Trump's order violated the law in part because it contained no clear date for when the travel restrictions would be lifted, Kennedy appeared to suggest that such a demand was unreasonable — even impossible.

"So you want the president to say, 'I'm convinced that in six months we're going to have a safe world'," Kennedy said.

Lower courts, including two federal appeals courts, have generally sided with the plaintiffs in ruling that Trump's travel ban has been similar in its intention and implementation to the first two travel bans, which barred nationals of only several majority-Muslim countries from entering the US.

But many of the justices on Wednesday appeared skeptical of Katyal's arguments that Trump had exceeded his lawful authority in introducing the ban.

The plaintiffs conceded that the Immigration and Nationality Act grants the president broad powers to restrict the entry of certain travelers, but they argued that the Trump administration "grossly" exceeded its authority by placing indefinite restrictions on a group of countries that comprises roughly 150 million people.

Justice Roberts at one point used an analogy to demonstrate an instance where Trump would clearly have the authority to issue travel restrictions.

"[If] we have 100% solid information that on a particular day, 20 nationals from Syria are going to enter the United States … In that situation, could the president ban the entry of Syrian nationals on that one day?" he said to Katyal, who conceded that such an order would be lawful due to the clear nature of the threat and a concrete time limit.