Walmart, the nation's largest retail chain, has asked the campaign of Sen. Cindy Hyde-Smith, R-Miss., to refund a total of $4,000 in campaign donations after actress Debra Messing flagged the contribution and complained to her more than 530,000 Twitter followers.

The most recent donation from a Walmart PAC was reported on Nov. 18, according to a Federal Election Commission report. The contribution was reported several days after Hyde-Smith was caught on camera joking alongside one of her longtime supporters that if he ever invited her to attend a public hanging, she'd sit in the front row.

Hyde-Smith and her campaign later clarified that the comment was a bad joke. But talk of public hangings in a state with a deep history of them earned a strong rebuke from her Democratic opponent, Mike Espy, who is African-American, other Mississippi Democrats and national civil rights groups.

Get Breaking News Delivered to Your Inbox

Hyde-Smith and Espy are set to appear at a televised debate on Tuesday ahead of a Nov. 27 runoff election. Neither candidate earned at least 50 percent of the vote on Election Day. Espy is a deep underdog in the contest, given that Mississippi has not elected a Democrat to the U.S. Senate since 1982. CBS News rates this race "leans Republican."

Messing, co-star of NBC's "Will and Grace" and an active Twitter user known for touting her liberal views, called out the retail giant for making the donation on Monday, linking to a blog that had flagged the contribution. The Popular Information blog first noticed on Monday that Walmart's PAC for Responsible Government had donated the $2,000.

On Tuesday morning, Walmart replied to Messing via Twitter: "Completely understand your concern. Sen. Hyde-Smith's recent comments clearly do not reflect the values of our company and associates. As a result, we are withdrawing our support and requesting a refund of all campaign donations."

In a separate statement, the company said, "Sen. Hyde-Smith's recent comments clearly do not reflect the values of our company and associates. As a result, we are withdrawing our support and requesting a refund of all campaign donations."

A Walmart spokeswoman clarified that the company's PAC made a $2,000 donation on Nov. 8, two days after the general election and several days before video of Hyde-Smith's comments first surfaced. A separate $2,000 donation was made to her campaign during the general election. The company regularly makes contributions to Democratic and Republican candidates through the PAC, but has formally contacted the Hyde-Smith campaign to request a refund, according to the spokeswoman.

A spokesperson for Hyde-Smith's campaign didn't immediately respond to requests for comment.