Mississippi Republican Sen. Cindy Hyde-Smith expressed regret over saying that she would attend a "public hanging" if invited by a supporter, saying during the debate with Democrat Mike Espy Tuesday night that she apologized to "anyone who was offended by my comments."

She and Espy met for the only debate before the special election on Nov. 27 in the contentious race to be elected the next U.S. senator from Mississippi. Hyde-Smith, who was appointed by Gov. Phil Bryant to fill the remainder of Sen. Thad Cochran's term after he retired this year, has been embroiled in controversy after refusing to back down from racially-tinged gaffes.

A video of Hyde-Smith posted to Twitter earlier this month showed her praising a supporter, saying: "If he invited me to a public hanging, I'd be on the front row." These comments were interpreted as insensitive because Mississippi had the most lynchings between 1882 and 1968 of any other state, with 581 lynchings. Espy, a former Clinton official and congressman, is black.

Get Breaking News Delivered to Your Inbox

Later, another video posted by the same person on Twitter, the publisher of a liberal-leaning news site, showed Hyde-Smith discussing "liberal folks" and making it "just a little more difficult" for them to vote.

At the debate on Tuesday, Hyde-Smith said that her comments had been turned into "a political weapon to be used against me."

"For anyone who was offended by my comments, I certainly apologize. There was no ill will, no intent whatsoever in my statements," she said. "I also recognize that this comment was twisted and 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 kind of politics Mississippians are sick and tired of."

Espy retorted: "No one twisted it. It came out of your mouth. It has caused our state harm. It has rejuvenated stereotypes that we don't need."

Hyde-Smith initially refused to further explain her "public hanging" comments beyond an initial statement saying the reaction was overblown, and her campaign has said that the comments about creating barriers to voting were made in jest. However, the controversy is already having consequences: Walmart, the nation's largest retail chain, has asked the Hyde-Smith campaign to refund a total of $4,000 in campaign donations.

Mississippi has a sizable black population, which comprises nearly 40 percent of the population as a whole. Espy, who if elected would be the first black person to represent Mississippi in the Senate since Reconstruction, might be able to inspire black voters to turn out in a special election. Black voters buoyed Democrat Doug Jones to victory in his Senate race in neighboring Alabama last year.

Still, Hyde-Smith is the favorite to win in the race. President Trump is visiting Mississippi on Monday to rally on her behalf and encourage Republicans to vote. Mr. Trump told reporters on Tuesday that Hyde-Smith is a "spectacular woman" who "feels very badly" about the comments she made.

Most of the debate on Tuesday was spent discussing protection for patients with preexisting conditions.

Hyde-Smith said the legislation she is cosponsoring with Sen. Thom Tillis to protect patients with preexisting conditions shows her commitment to the issue. Espy pointed out that the legislation would require the insurance companies to cover the patient with a preexisting condition but does not require the company to provide the treatment for the condition itself. Hyde-Smith said Espy denied an employee a promotion because he had a daughter with a preexisting condition. which Espy denied.

Preexisting conditions was the dominant issues but the debaters also covered illegal immigration, education shortages, and infrastructure reform.

Espy presented himself as a moderate and said he had a policy of "Mississippi first" that would tie him to the voter, not the party or president. Hyde-Smith aligned herself with the president on each issue and encouraged viewers to claim their tickets to the two Trump rallies on Monday.