This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

The Supreme Court has upheld President Donald Trump’s travel ban.

The ruling was 5-4 along partisan lines, with Chief Justice John Roberts writing for the conservative majority.

This is the third version of the travel ban. It was issued in September — after previous bans had ricocheted through the courts — and restricts entry from seven countries to varying degrees: Iran, North Korea, Syria, Libya, Yemen, Somalia and Venezuela. Chad was originally on the list but it was recently removed after having met baseline security requirements.

“The Proclamation is squarely within the scope of Presidential authority,” Roberts wrote.

Trump immediately reacted on Twitter:

SUPREME COURT UPHOLDS TRUMP TRAVEL BAN. Wow!

The ruling sends a strong message that the President has broad powers under immigration law to act to protect national security and that statements made during a campaign may not be legally determinative of an executive’s intent.

Challengers, including the state of Hawaii, argued that the proclamation exceeded the President’s authority under immigration law as well as the Constitution. They also used Trump’s statements during the campaign, when he called for a ban on travel from all Muslim-majority countries, but Roberts dismissed those concerns.

“Plaintiffs argue that this President’s words strike at fundamental standards of respect and tolerance, in violation of our constitutional tradition,” Roberts wrote. “But the issue before us is not whether to denounce the statements. It is instead the significance of those statements in reviewing a Presidential directive, neutral on its face, addressing a matter within the core of executive responsibility. In doing so, we must consider not only the statements of a particular President, but also the authority of the Presidency itself.”

Sotomayor dissent

Justice Sonia Sotomayor, in a blistering dissent, said the court was wrong to ignore Trump’s various comments.

“The majority here completely sets aside the President’s charged statements about Muslims as irrelevant,” she wrote. “That holding erodes the foundational principles of religious tolerance that the court elsewhere has so emphatically protected, and it tells members of minority religions in our country ‘that they are outsiders, not full members of the political community.'”

She also compared the opinion to one that came down in 1944 in which the court blessed the internment of Japanese-Americans during World War II.