Civil rights groups and Democrats on Tuesday rejected the Supreme Court decision to uphold President Donald Trump's ban on travel to the United States from several Muslim countries, with many comparing it to a 1944 ruling that upheld the government's decision to create internment camps for Japanese-Americans.

Omar Jadwat, the director of the American Civil Liberties Union's Immigrants' Rights Project, said the decision "will go down in history as one of the Supreme Court's great failures" and "repeats the mistakes of the Korematsu decision upholding Japanese-American imprisonment."

Today's Supreme Court ruling repeats the mistakes of the Korematsu decision. It takes the government lawyers' flimsy national security excuse for the ban at face value, instead of taking seriously the president's own explanation for his actions. — ACLU (@ACLU) June 26, 2018

Sen. Mazie Hirono, D-Hawaii, also compared Tuesday's decision to Korematsu, and expressed concern that it could set a precedent allowing the Trump administration, which has doubled down on its hardline immigration stance in recent months, to go after other immigrants.

"Who is going to be next? Is the president going to issue an executive order against Mexicans? Is he going to issue executive orders against people coming from Honduras or Guatemala? What's next?" Hirono told NBC News. She added that she wasn't optimistic that Congress would provide a check against the Trump administration moving forward.

"In order for checks and balances to work, we need a Congress that will serve as a check," she said. "We certainly don’t have that now."

Shelby, Korematsu, Dred Scott, and now, Trump v. Hawaii. Today's decision joins a line of rulings history will look back on in shame. Join us on the #SCOTUS steps at 11:45 to affirm that #wewillnotbebanned https://t.co/QV4oXJL9xi — Rep. Hank Johnson (@RepHankJohnson) June 26, 2018

Rep. Keith Ellison, D-Minn., the first Muslim-American elected to Congress, said in a statement that the ruling "undermines the core value of religious tolerance on which America was founded” and "gives legitimacy to discrimination and Islamophobia."

"This decision will someday serve as a marker of shame," he added.

Gadeir Abbas, an attorney for the Council on American-Islamic Relations, said the ruling was "deeply disappointing" for the Muslim community.

"The Supreme Court's decision today will be remembered by the Muslim community just as the Dred Scott decision is remembered by the African-American community (and) as the Korematsu decision is remembered by the Japanese-American community," he said.

Advocates with the Brennan Center for Justice criticized the court's decision as "unconscionable."

"In failing to strike down this obviously bigoted policy, which has nothing to do with national security, the Supreme Court came down on the wrong side of history," Faiza Patel, co-director of the group's Liberty & National Security Program, said. "More importantly, it endorsed the immense harm already felt by American Muslims and their families."

In the high court's ruling, Chief Justice John Roberts, writing for the majority, said the court viewed the ability to regulate immigration as squarely within a president's powers and he rejected critics' claims of anti-Muslim bias.

"The text says nothing about religion," Roberts wrote.

He added that, "Korematsu has nothing to do with this case" and that "it is wholly inapt to liken that morally repugnant order to a facially neutral policy denying certain foreign nationals the privilege of admission."

"Korematsu was gravely wrong the day it was decided, has been overruled in the court of history, and — to be clear — 'has no place in law under the Constitution,'" Roberts wrote.

Writing for the dissent, Justice Sonia Sotomayor, however, had argued that the decision by the majority to uphold the travel ban was "all the more troubling given the stark parallels between the reasoning of this case and that of Korematsu."

Several Democrats, citing the fact that other federal courts had ruled against prior versions of the travel ban, said it was simply a watered-down version of the Muslim ban that Trump promised during his 2016 campaign.

"No matter how many times the president rewrites his un-American Muslim ban, it won’t change the fact that this historic injustice is immoral and dangerous," House Minority Leader Nancy Pelosi, D-Calif., said in a statement.

Sen. Cory Booker, D-N.J., told NBC News that, "We cannot walk away from the fact of how this all started, which is a president who said he wanted to ban Muslims from this country."

Other Democrats floated the idea of proposing legislation that would work to overturn the ruling.

"This opinion is by no means the end of this story. It is no solution to a higher security or constitutional issues," Sen. Richard Blumenthal, D-Conn., said.

"This has to be reversed," he added. "Congress now has to work to do and it cannot simply allow the courts determine or the president what our future is in this area."

At least one Republican — Rep. Carlos Curbelo of Florida — joined in with his Democratic colleagues, criticizing the policy the ruling upheld as "misguided."

"While we should demand a strong vetting process and orderly, lawful entry, we must not summarily reject an entire region of the world, and we should never use any religious test," Curbelo said in a statement. "I urge the Administration to discontinue this misguided policy and instead take action to continue our tradition of welcoming those who are persecuted."

Most other Republicans, however, celebrated the ruling, with many saying they weren't at all surprised the court ruled to uphold the controversial policy.

Moments after the court released its decision, Senate Majority Leader Mitch McConnell's campaign account tweeted a photo of the Republican leader shaking hands with Supreme Court Justice Neil Gorsuch, who voted with the 5-4 majority to uphold the Trump policy.

McConnell maneuvered Senate rules to deny a vote for former President Barack Obama's pick to fill a vacancy on the Supreme Court, and helped get Gorsuch, a conservative Trump nominee, confirmed after the new president took office.

Sen. John Cornyn, R-Texas, told NBC News, that he wasn't surprised by Tuesday's ruling.

"This is not anything President Obama didn't do when he was president. So, I'm not surprised the Supreme Court ruled the way they did," Cornyn told NBC News.

He added that he felt the policy's characterization as a "Muslim ban" was "part of the never-Trump resistance."