“The majority holds otherwise by ignoring the facts, misconstruing our legal precedent, and turning a blind eye to the pain and suffering the Proclamation inflicts upon countless families and individuals, many of whom are United States citizens,” Sotomayor wrote in the dissenting opinion, which Ginsburg joined.

The ban, announced in September, is the third iteration of a Trump policy to crack down on immigration from Muslim-majority countries. Lower courts blocked the ban last fall, but the Supreme Court allowed it to go into effect in December while legal proceedings continued in the case Trump v. Hawaii. The state of Hawaii argued that the ban discriminates based on nationality and specifically targets Muslims. The Trump administration, meanwhile, contended that such a ban is a necessity for national security purposes.

The majority decision held that the president was within his authority to enact a travel ban, which severely restricted the ability of certain foreign nationals and refugees to enter the U.S.

[D]espite several opportunities to do so, President Trump has never disavowed any of his prior statements about Islam.dissent by Justices Sonia Sotomayor and Ruth Bader Ginsburg

But the dissent by Sotomayor and Ginsburg argued Trump’s travel ban couldn’t be considered outside the statements of the man himself. Trump has repeatedly shared negative opinions about Muslims and has explicitly called for banning them from the U.S. According to an adviser, he also asked for help in carrying out the plan legally.

“Ultimately, what began as a policy explicitly ‘calling for a total and complete shutdown of Muslims entering the United States’ has since morphed into a ‘Proclamation’ putatively based on national-security concerns,” the justices wrote. “But this new window dressing cannot conceal an unassailable fact: the words of the President and his advisers create the strong perception that the Proclamation is contaminated by impermissible discriminatory animus against Islam and its followers.”

The dissent also points out that as a candidate, Trump likened his proposal to Japanese-American internment during World War II, called for surveillance of mosques, and told an “apocryphal story” about a U.S. general killing Muslim insurgents with bullets dipped in pigs’ blood. Sotomayor and Ginsburg also noted Trump has made many negative comments about Islam and Muslims, including that “Islam hates us” and that Muslims “do not respect us at all.”

This didn’t stop when Trump became a president, the justices said. In April 2017, Trump recited a poem called “The Snake” in reference to Syrian refugees. He retweeted anti-Muslim videos in November.

He hasn’t apologized or taken back any of it.

“[D]espite several opportunities to do so, President Trump has never disavowed any of his prior statements about Islam,” the justices wrote. “Instead, he has continued to make remarks that a reasonable observer would view as an unrelenting attack on the Muslim religion and its followers.”

The Supreme Court only a month ago “found less pervasive official expressions of hostility and the failure to disavow them to be constitutionally significant” in the Masterpiece Cakeshop case, which involved a shop owner who refused to make a cake for a same-sex wedding based on his religious beliefs, the justices noted. The majority opinion in that case cited statements made by the Colorado Civil Rights Commission and said they showed “hostility to a religion.”

The dissent also points to the “stark parallels between the reasoning of this case and that of Korematsu v. United States,” the case in which the Supreme Court upheld internment of Japanese-Americans during World War II.

“By blindly accepting the Government’s misguided invitation to sanction a discriminatory policy motivated by animosity toward a disfavored group, all in the name of a superficial claim of national security,” the dissent reads, “the Court redeploys the same dangerous logic underlying Korematsu and merely replaces one ‘gravely wrong’ decision with another.”