(CNN) -- 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.
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."
This story is breaking and will be updated.