2020 presidential hopeful Beto O’Rourke made headlines in recent days for comparing President Trump’s immigration rhetoric to that of Nazi Germany -- but twisted the president's words in the process.

In Iowa last week, the former Texas congressman said the Trump administration's family separation policy "follows the rhetoric of a president who not only describes immigrants as rapists and criminals, but as animals and an infestation."

BETO DOUBLES DOWN ON CALL TO ABOLISH ELECTORAL COLLEGE

He added: "Now, I might expect someone to describe another human being as an infestation in the Third Reich. I would not expect it in the United States of America."

Later Thursday, O'Rourke defended his comments when asked by reporters if he was comparing the Trump administration to Nazi Germany: "Calling human beings an infestation is something that we might've expected to hear in Nazi Germany. ... Describing immigrants -- who have a track record of committing violent crimes at a lower rate than native-born Americans -- as rapists and criminals. Seeking to ban all Muslims -- all people of one religion -- what other country on the face of the planet does that kind of thing?"

He continued: "Putting kids in cages? Saying that neo-Nazis and Klansmen and white supremacists are 'very fine people'? ... [T]his is not something that I expected to hear a president of the United States ever say."

O'Rourke covered a lot of ground in the comments, referencing family separations at the border as well as the so-called travel ban and Trump's controversial comments after the violence at a white supremacist rally in Charlottesville -- criticism at least rooted in Trump policies and remarks.

But his claim that Trump referred broadly to immigrants as an "infestation" took the president's words significantly out of context. In the original comments -- a tweet -- Trump used the word "infestation" in reference to MS-13 gangs.

“When we have an ‘infestation’ of MS-13 GANGS in certain parts of our country, who do we send to get them out? ICE! They are tougher and smarter than these rough criminal elelments [sic] that bad immigration laws in our country. Dems do not appreciate the great job they do!” Trump tweeted last July.

Shortly before that, Trump posted a slightly broader tweet using the term "infest," but largely in reference to illegal immigrants and specifically MS-13.

O'Rourke similarly accused the president of referring to immigrants as "animals" -- though that, too, has been disputed.

“You wouldn’t believe how bad these people are. These aren’t people, these are animals, and we’re taking them out of the country at a level and at a rate that’s never happened before,” Trump said last May.

Democrats, including now-House Speaker Nancy Pelosi, D-Calif., and Senate Minority Leader Chuck Schumer, D-N.Y., criticized the president for his rhetoric at the time. But Trump and his allies argued he was only referring to MS-13.

BETO O'ROURKE PICKING OFF SUPPORT FROM PRIMARY RIVALS OUT OF THE GATE

Trump even doubled down on his comments, saying MS-13 gang members are “not people.”

“These are animals and we have to be very, very tough,” Trump said.

O’Rourke announced his 2020 presidential bid last month, after a close defeat in his 2018 Senate race against Sen. Ted Cruz, R-Texas. O’Rourke’s campaign announced last week that they had raised $9.4 million in the first 18 days of their campaign.

Fox News’ Nicole Darrah, Adam Shaw, and The Associated Press contributed to this report.