Sen. Joe Kennedy III (D-MA) speaks about U.S. President Trump's travel ban outside the U.S. Supreme Court following a court issued immigration ruling June 26, 2018 in Washington, DC.

A Supreme Court ruling Tuesday morning delivered President Donald Trump a huge win in the long-fought battle over his administration's travel ban, immediately prompting celebration from Republicans and scorn from Democrats.

In a 5-4 decision in the case of Trump v. Hawaii, the high court determined that the president's application of the law in restricting entry from certain countries was constitutional.

"Wow!" Trump wrote in a tweet shortly after the decision to uphold the policy was reported.

Trump tweet Wow

A White House statement called the ruling "a moment of profound vindication following months of hysterical commentary from the media and Democratic politicians."

Democrats immediately condemned the decision.

Despite the court rejecting claims that the ban was motivated by religious hostility, Rep. Ted Lieu, D-Calif., said such "animus" was "legitimized" by the ruling.

Ted Lieu tweet

Rep. Marc Veasey, D-Texas, said the policy constituted discrimination against Muslims:

Marc Veasey tweet

Sen. Mark Warner, D-Va., called for Congress to "take action."

"While I disagree with the court, today’s decision does not make the President’s actions or statements related to the travel ban moral or just," he said in a statement. "We need to fight religious discrimination at every turn."

Adam Schiff, D-Calif., ranking member of the House Intelligence Committee and a critic of Trump administration attacks on special counsel Robert Mueller's Russia probe, also maintained the policy was a "Muslim ban."

Schiff tweet

Congressional Republicans, however, joined the president in celebrating the ruling.

Senate Majority Leader Mitch McConnell's campaign Twitter account posted a photo of the Kentucky Republican shaking hands with Justice Neil Gorsuch, the newest of the Supreme Court who was hand-picked by Trump.

McConnell Gorsuch tweet

McConnell had been a key player in holding up a vote on President Barack Obama's nominee, Merrick Garland, leaving the seat on the court vacant for more than a year. McConnell had called the decision to block the vote "the most consequential decision I've ever made in my entire public career."

Attorney General Jeff Sessions applauded the court's ruling, saying in a statement that it was "critical to ensuring the continued authority of President Trump — and all future presidents — to protect the American people."

Sen. Lindsey Graham, R-S.C., said in tweets that he was "pleased" with the outcome. He also reaffirmed that the administration's policy was "not a religious ban" before adding that "we are at war with radical Islam and must act accordingly to protect our nation."

Graham tweet 1

Graham tweet 2

Rep. Steve Scalise, R-La., said the court made the "right decision." Scalise is reportedly vying for the role of speaker of the House, which will be vacated by Rep. Paul Ryan in January.

Scalise tweet

On Tuesday afternoon, Utah Senate hopeful and former GOP presidential nominee Mitt Romney weighed in, describing the administration's stance on immigration as a check on "five countries that represent a very small share of Muslim nations that do not have procedures in place to determine if somebody could represent a threat to our country" in an NBC interview.

Romney added: "That's a posture which I think the Supreme Court found compelling, and the Supreme Court is the final word on the law of the land — and we follow the law of the land."

The left-right divide in opinion on the travel ban ruling appeared to hold firm even outside the Washington beltway.

Connecticut Gov. Dannel Malloy, a Democrat, said in a statement that the decision "underscores the cruelty and callousness of the Trump administration’s policies."

Steve Bannon, former Trump advisor and Breitbart News executive chairman, called the ruling "a vindication of the president."

“Donald Trump ran on and won because of his commitment to keep America safe," Bannon said in a statement. "Today's Supreme Court ruling on his travel ban is a vindication of the President , his administration and the will of the American people.”