Former Texas congressman and Democratic presidential candidate Beto O’Rourke called President Trump “the most openly racist president that we’ve had in modern history” at a Miami town hall event Tuesday night.

“Donald Trump is the most openly racist president that we’ve had in modern history, perhaps in all of American history," O'Rourke said, "who's called Mexican immigrants rapists and criminals, who's said that we've got to ban all Muslims as though there's something wrong or defective about some people given their religion, who's described Klansmen and white supremacists as very fine people.”

O’Rourke had been asked about Trump’s refusal to apologize to a group of black men accused of raping a jogger in New York's Central Park in 1989. The men, who became known as the Central Park Five, were exonerated in 2002 after another man confessed to the assault. The case has attracted new attention in the wake of Ava DuVernay's Netflix documentary "When They See Us."

LINDA FAIRSTEIN SLAMS CENTRAL PARK FIVE DOCUMENTARY 'WHEN THEY SEE US'

O’Rourke has openly attacked the president for his rhetoric and ideologies. Earlier this week, he claimed that Trump was responsible for a rise in hate crimes across the country.

At the town hall, he criticized the Trump administration's hard-line immigration policy.

“You don't put them in cages, you don't separate them from their families," O'Rourke said. "You don't torture them the way that we've been torturing them. I'm going to stand up for everyone as president in this country. I'm going to acknowledge that we don't need to tolerate or respect our differences. We need to embrace them. It's what makes us stronger and better and safer and more secure as a country.”

Earlier this month, O’Rourke met with a small group representing a community of slave descendants in South Carolina as he strives to make connections with black voters who will play a dominant role in next year’s Southern presidential primaries.

O’Rourke acknowledged what he identified as his own struggle with not knowing enough about the history of slavery in the United States and its ongoing ramifications.

“White Americans do not know this story,” O’Rourke said, noting that until a tour of the church’s grounds, he hadn’t known anti-slavery activist Harriet Tubman had lived in the area.

CLICK HERE TO GET THE FOX NEWS APP

O’Rourke has addressed issues concerning white privilege before, telling a crowd at a historically black college in South Carolina earlier this year that he might not know their struggles but wanted to try to help them. In Iowa, he said he didn’t think being a white man in a historically diverse field of candidates put him at a disadvantage because his sex and race have given him inherent advantages for years.

The Associated Press contributed to this report.