Justice Anthony Kennedy, possibly the swing vote in Tuesday’s 5-4 decision upholding President Trump Donald John TrumpBiden on Trump's refusal to commit to peaceful transfer of power: 'What country are we in?' Romney: 'Unthinkable and unacceptable' to not commit to peaceful transition of power Two Louisville police officers shot amid Breonna Taylor grand jury protests MORE’s travel ban, issued a concurring opinion that appeared to warn the president against making statements that disfavor any one religion.

Kennedy did not mention Trump by name in the two-page opinion, but appeared to send the message that the president should be careful not to make public statements that could infringe on the Constitution’s protections for freedom of religion.

ADVERTISEMENT

The justice, who has long been a swing vote on the court and is the subject of retirement speculation, said certain statements and actions are not subject to judicial scrutiny or intervention.

But he said that does not mean that officials are free to flout the Constitution and the rights it proclaims and protects.

“Indeed, the very fact that an official may have broad discretion, discretion free from judicial scrutiny, makes it all the more imperative for him or her to adhere to the Constitution and to its meaning and its promise,” he wrote.

“The First Amendment prohibits the establishment of religion and promises the free exercise of religion. From these safeguards, and from the guarantee of freedom of speech, it follows there is freedom of belief and expression,” the opinion continues.

“It is an urgent necessity that officials adhere to these constitutional guarantees and mandates in all their actions, even in the sphere of foreign affairs,” Kennedy wrote. “An anxious world must know that our Government remains committed always to the liberties the Constitution seeks to preserve and protect, so that freedom extends outward, and lasts.”

Hawaii and others challenging Trump’s travel ban argued the statements Trump made on the campaign trail and while in office prove the president’s ban was rooted in a religious animus toward Islam, and that its primary purpose was to discriminate against Muslim people.

But the court said the proclamation was expressly premised on legitimate national security purposes and the text said nothing about religion.

In a fiery dissent, Justice Sonia Sotomayor said the court was wrong to ignore Trump’s remarks, including his campaign pledge to ban Muslims and his retweeting of anti-Muslim videos, which she recounted in detail.

“In sum, none of the features of the Proclamation highlighted by the majority supports the Government’s claim that the Proclamation is genuinely and primarily rooted in a legitimate national-security interest,” she said.

“What the un-rebutted evidence actually shows is that a reasonable observer would conclude, quite easily, that the primary purpose and function of the Proclamation is to disfavor Islam by banning Muslims from entering our country.”