(CNN) —  

The first Muslim elected to Congress predicted on Tuesday that the Supreme Court’s decision to uphold President Donald Trump’s travel ban will end up in “the dust bin of history,” adding that Trump has tailored the court to “his ugly philosophy.”

“Our country has gone through some ugly days. The Supreme Court in the 1850s said that it was OK to own a black person, that was the Dred Scott decision. That decision hit the dust bin of history … and this one will too,” Rep. Keith Ellison, a Democrat from Minnesota, told CNN’s Kate Bolduan on “At This Hour.”

“Discrimination and racism and hatred and religious bigotry is never going to be winning in the end,” Ellison said.

The Supreme Court handed a major victory to the Trump administration on Tuesday by upholding the third version of the President’s travel ban, which restricts entry from seven countries – Iran, North Korea, Syria, Libya, Yemen, Somalia and Venezuela – to varying degrees.

Ellison said that the President “has his Supreme Court tailor-made to his ugly philosophy,” calling it a “partisan court.”

He added that he does not believe Justice Neil Gorsuch, whom Trump appointed after congressional Republicans blocked former President Barack Obama from filling a vacancy late in his presidency, is on the court “properly.”

“It just proves one thing, that if you steal and rip off a Supreme Court justice, then you can try to jam any kind of nasty, racist, ugly policy down the throat’s of the American people. But we’re not taking it,” Ellison said.

CNN’S Ariane de Vogue contributed to this report.