US Republican presidential candidate Donald Trump speaks during a news conference at Trump Tower in New York City. Thomson Reuters A Republican senator from Illinois announced on Tuesday that he would not support Donald Trump, his party's presumptive nominee for president, in November.

Mark Kirk's statement was issued amid a firestorm in the Republican Party about Trump's attacks on a federal judge, which many have characterized as racist. And it came after the senator said that he would support Trump if the real-estate mogul won the nomination.

"I have spent my life building bridges and tearing down barriers — not building walls," Kirk said in the statement. "That's why I find Donald Trump's belief that an American-born judge of Mexican descent is incapable of fairly presiding over his case is not only dead wrong, it is un-American."

The statement continued:

As the Presidential campaign progressed, I was hoping the rhetoric would tone down and reflect a campaign that was inclusive, thoughtful and principled. While I oppose the Democratic nominee, Donald Trump's latest statements, in context with past attacks on Hispanics, women and the disabled like me, make it certain that I cannot and will not support my party's nominee for President regardless of the political impact on my candidacy or the Republican Party.

Kirk is up for reelection in the Senate and facing heavy opposition from Democratic challenger Tammy Duckworth. Politico called him "the most endangered Republican senator in the country," noting that Kirk "isn't just distancing himself from the rest of the GOP — he's fleeing from it."

In a speech on Monday in Chicago, Duckworth slammed Kirk over his failure to endorse or condemn the presumptive Republican presidential nominee.

"As Dr. King did, there comes a time when silence is betrayal. Trump may be a clown, but he isn't funny — he's not a riverboat gambler to be admired. He's not a 'net benefit' to your campaign or to the country. He's a demagogue and he's menace," Duckworth said.

"Any politician who stays silent, or hopes to fly under the radar, is complicit in his campaign of hate and division — and deserves to be judged harshly," she added.

Democrats in Illinois have repeatedly found creative ways to highlight Kirk's tepid support for Trump.

Only hours before Kirk announced that he would not support the real-estate magnate, the state party released a website, "TrumpOrKirk.com," which quizzes visitors on whether Trump or Kirk made an inflammatory quote. The party has released press emails with Photoshopped images of Kirk with Trump's trademark hair and a red "Make America Great Again" hat.

While Kirk might be the first Senate Republican to un-endorse Trump for president, others in the party have condemned his comments on US District Judge Gonzalo Curiel, who is presiding over lawsuits related to the now defunct Trump University.

Trump has repeatedly said that Curiel, who was born in Indiana to Mexican parents, cannot be impartial because "he's a Mexican." Trump argued that Curiel's heritage is relevant because of his promise to build a wall along the US-Mexico border if he's elected in November.

House Speaker Paul Ryan called Trump's remarks "the textbook definition of a racist comment."