Presidential candidate Beto O’Rourke assailed President Trump as a “racist” for criticizing Rep. Ilhan Omar, D-Minn., over her remarks that appeared to downplay the September 11, 2001 terror attacks.

Speaking at the College of William & Mary in Williamsburg, Virginia, O’Rourke said Trump was “hateful” and incited violence against Muslims.

BETO O'ROURKE CONFRONTED AT TOWN HALL ABOUT STINGY CHARITABLE DONATIONS

“He’s trying to incite hatred, Islamophobia and, I would argue, violence against her and other Muslims in this country,” O’Rourke said.

“This is the test of all tests for us. It’s not just that he is partisan, it’s not just that he is divisive. He is hateful. He is racist. He has encouraged the worst tendencies amongst our fellow Americans.

“Unless we can beat him in November of 2020, it will continue. Unless we offer a compelling, profoundly powerful alternative to hatred and division and fear and anger, it will continue.”

“He is hateful. He is racist. He has encouraged the worst tendencies amongst our fellow Americans.” — Beto O'Rourke

His comments came after Omar’s remarks last month at a Muslim advocacy group’s fundraiser, where she appeared to refer to the 9/11 attacks by saying “some people did something.” The description prompted criticism from Trump, who shared a video of her comments together with the footage of the terror attacks.

But O’Rourke’s latest attempt to directly confront Trump follows his diminishing stardom and the rising stock of Mayor Pete Butttigieg -- who has lately received similar media coverage as O’Rourke during the Texas Senate election last year.

SANDERS NABS TOP SPOT IN NEW DEMS POLL AS PETE BUTTIGIEG GAINS MOMENTUM

A new poll released Monday has Sen. Bernie Sanders, I-Vt., leading the 2020 Democratic presidential field, while former Vice President Joe Biden is in the second place, though he still hasn’t declared his candidacy.

Buttigieg, meanwhile ranked third ahead of O’Rourke, Sens. Kamala Harris and Elizabeth Warren, according to an Emerson Polling poll.

This is a downgrade for O’Rourke after he was ranked third in a poll just a few weeks ago. He also raised an eye-popping $6 million in his first 24 hours as a candidate.

Since then, however, he has been subjected to a more critical coverage than during the Senate bid, leading to a decline of his chances.

At another event in Virginia on Tuesday, O’Rourke was confronted by a voter about his charitable giving after his recently released tax returns showed he and his wife gave away just a tiny fraction of their income.

The filings show the couple had given $1,166 to charity in 2017 despite having a combined income of $370,412, which calculates to roughly one-third of 1 percent of their income.

According to a Washington Post reporter, a student who attended the town hall at the University of Virginia asked the former Texas representative why her sister, who was a recent college graduate, donated more to charity while making much less than he and his wife.

GET THE FOX NEWS APP

O’Rourke responded by saying he does his best to give back to communities, but noted that some of the ways he gives back are “immeasurable.”

“I’ve served in public office since 2005. I do my best to contribute to the success of my community, of my state, and now, of my country. There are ways that I do this that are measurable and there are ways that I do this that are immeasurable. There are charities that we donate to that we’ve recorded and itemized, others that we have donated to that we have not,” he said.

Fox News’ Joseph A. Wulfsohn contributed to this report.