A white U.S. senator from Mississippi apologized Tuesday night after drawing criticism for saying she’d be willing to attend “a public hanging.”

Sen. Cindy Hyde-Smith, a Republican who is the state’s first female member of Congress, issued the apology during a debate against her Democratic opponent, Mike Espy, who is African-American. The pair will face each other in a runoff election next Tuesday.

"For anyone that was offended by my comments, I certainly apologize. There was no ill will, no intent whatsoever in my statement," Hyde-Smith said during the televised debate.

"For anyone that was offended by my comments, I certainly apologize. There was no ill will, no intent whatsoever in my statement."

— U.S. Sen. Cindy Hyde-Smith, R-Miss.

A video released last week included Hyde-Smith making the remark at a campaign event in Tupelo on Nov. 2.

The senator praised a local cattle rancher, saying: "If he invited me to a public hanging, I'd be on the front row."

Shortly after the video's release, she said in a statement that the expression was an "exaggerated expression of regard" and said it would be "ridiculous" to read any negative connotation into it.

Earlier Tuesday, President Trump came to Hyde-Smith’s defense.

"It was just sort of said in jest," Trump said. "She's a tremendous woman and it's a shame that she has to go through this.”

The president has plans to visit Tupelo and Biloxi next week in support of Hyde-Smith’s campaign.

TRUMP TO CAMPAIGN FOR HYDE-SMITH IN MISSISSIPPI AS DEMS AIM TO ENERGIZE BLACK VOTERS

At Tuesday’s debate, Hyde-Smith addressed the matter again.

"There has never been anything, not one thing, in my background to ever indicate I had ill will toward anyone," Hyde-Smith, a former state agriculture commissioner, said. "I've never been hurtful to anyone. I've always tried to help everyone. I also recognize that this comment was twisted and it was turned into a weapon to be used against me, a political weapon used for nothing but personal and political gain by my opponent. That's the type of politics Mississippians are sick and tired of."

But the remark in the video struck a nerve with many in Mississippi, which has a history of lynchings. And Walmart asked her to return a $2,000 contribution to her campaign.

Espy responded during the debate.

"No one's twisted your comments because your comments were live, you know, it came out of your mouth,” he said. “I don't know what's in your heart but we all know what's in our mouths. It went viral in the first three minutes around the world. And so it's caused our state harm. It's given our state another black eye that we don't need. It's just rejuvenated those stereotypes that we don't need anymore."

During the debate, Hyde-Smith questioned a $750,000 lobbying contract Espy had in 2011 on behalf of an African despot who’s on trial before the International Criminal Court.

DEMOCRAT MISSISSIPPI SENATE HOPEFUL MISLED ABOUT $750G LOBBYING CONTRACT WITH AFRICAN DESPOT

The crimes against Laurent Gbagbo, a former president of the Ivory Coast, include “murder, rape and unspeakable things against young girls,” Hyde-Smith said.

"I don't know how many Mississippians can really relate to an income that can command a $750,000 check from one person for a lobbying job," she added.

Espy said he resigned from the position after finding out later that Gbagbo was “a really bad guy.”

Hyde-Smith, a cattle rancher, is an interim replacement for longtime Sen. Thad Cochran, who retired in April due to health concerns.

Espy is a former congressman and U.S. agriculture secretary who is seeking to become the state's first African-American senator since Reconstruction.

The Associated Press contributed to this story.