Democratic 2020 contender Beto O'Rourke on Thursday compared President Trump's rhetoric regarding immigration to that of Nazi Germany.

Speaking to reporters in Iowa, the former congressman — in response to a question about how he would address attacks from Republicans — called out "the rhetoric of a president who not only describes immigrants as rapists and criminals but as animals and an infestation."

BETO O'ROURKE, PETE BUTTIGIEG RISE IN NEW 2020 NATIONAL POLL

O'Rourke continued: "Seeking to ban all Muslims, all people of one religion, what other country on the face of the planet does that kind of thing? Or in our human history? Or in the history of the western world? Because they are somehow deficient or violent or a threat to us? Putting kids in cages, saying that Neonazis and Klansmen and white supremacists are 'very fine people'?"

"Now, I might expect someone to describe another human being as an infestation in the Third Reich," he said. "I would not expect that in the United States of America."

The Texan said that if people "don't call out racism — certainly at the highest levels of power, in this position of trust that the president enjoys — then we are going to continue to get its consequences," and added he will avoid using similar rhetoric because "if we descend into that pettiness and meanness and those personal attacks, I'm not sure that we can win."

CLICK HERE TO GET THE FOX NEWS APP

O'Rourke, who launched his campaign in mid-March, said Americans need to call out what the Trump administration is doing to "define a better future for this country."

The failed Senate candidate's campaign announced on Wednesday that they've raised $9.4 million in the first 18 days of the campaign.

The Associated Press contributed to this report.