Hannah Foslien/Getty Images Karin Housley, Republican candidate for U.S. Senate in Minnesota, waves to the crowd at an Oct. 4, 2018, campaign rally in Rochester, Minnesota, headlined by President Donald Trump.

Republican Karin Housley, a state senator running to represent Minnesota in the U.S. Senate, compared then-first lady Michelle Obama to a “chimp” in 2009.

In an April 2009 Facebook post, Housley criticized the first lady’s posture when she met Queen Elizabeth II.

“Michelle is soooo far from cool. Don’t we expect our First Ladies to at least stand up straight? (And my dear sister, know the proper etiquette and DO NOT TOUCH THE QUEEN!),” Housley wrote on her Facebook wall.

In the comment thread on her post, Housley said the chimpanzee in the 1951 film “Bedtime for Bonzo,” starring then-actor Ronald Reagan, likely had better posture than Mrs. Obama.

“I do miss Nancy Reagan. Ronald even more. Speaking of Bedtime for Bonzo, I think even that chimp stood up straighter than Michelle,” Housley wrote. “Uh-oh, someone is going to make a comment.”

Comparing African-Americans to apes, even obliquely, as Housley did, has been a longstanding feature of racist American innuendo. ABC canceled “Roseanne” at the end of May after star Roseanne Barr tweeted that Valerie Jarrett, an African-American who advised former President Barack Obama, looked like the child of “muslim brotherhood & planet of the apes.”

Facebook Karin Housley, a Republican candidate for U.S. Senate in Minnesota, wrote in 2009 that then-first lady Michelle Obama had worse posture than a "chimp" from a 1951 film.

Housley is challenging Sen. Tina Smith (D), Minnesota’s former lieutenant governor. Gov. Mark Dayton (D) appointed Smith to fill the Senate seat vacated by Al Franken, who resigned amid allegations of sexual misconduct in December.

Smith is leading Housley by a comfortable margin in recent polling. An NBC News survey conducted at the end of September and beginning of October showed Smith ahead by 16 percentage points.

When asked whether Housley stood by her comments, Jake Schneider, a spokesman for Housley’s campaign, questioned HuffPost’s journalistic judgment.

“It’s not surprising the Huffington Post—basically an extension of the Democratic Party—would do Tina Smith’s dirty work for her,” Schneider said in an emailed statement. “This is what the radical left does when they are losing—they attack Republicans so they don’t have to come up with solutions to the problems Minnesotans are facing.”

Housley has a history of boorish commentary.

In an April 2009 column for the Stillwater Gazette, Housley disparaged Hillary Clinton’s appearance by comparing her unfavorably to former Alaska Gov. Sarah Palin.

“Gov. Sarah Palin didn’t even have to utter a word and people thought she wasn’t qualified. Sarah is beautiful (hot even, some say), with a stunning smile, great figure and an adorable family,” she wrote.

“Is it possible that we judge the beautiful people in reverse? She’s attractive, therefore not smart?” Housley continued. “Would we rather have our women in politics look like Hillary Clinton?”

Housley returned to the theme of Clinton’s looks in an August 2009 Facebook exchange. A friend remarked that the then-secretary of state “seems to be eating well.”

Housley agreed. “That’s what I thought too … porker in a royal blue pantsuit,” she wrote.

Another friend lamented Clinton’s light-blue pantsuit, which prompted Housley to express pity for former President Bill Clinton.

“I saw that light blue one too! Variety is the spice of life,” she wrote. “I can’t believe I’m going to say this, but Poor Bill!”

In December 2009, Housley spoke out about another pet peeve: Barack Obama’s pronunciation of Pakistan, which she said was not “American.”

Why, Housley wondered, did he pronounce it “Pockiston”?

“And why doesn’t he say Offgoniston? That one he says like an American. I find it odd,” she added.

Housley also used the word “queer,” a term reclaimed by LGBTQ-identifying people to describe non-heterosexual orientations, in a pejorative way.

“Trying to figure out why I chose that queer profile picture,” she posted.

“You do own some fuzzy purple pants,” a friend commented.

“Ummm…. listen QUEER BOY, I have lost them, seriously, lost the purple plants,” she replied.