The mayor of a tiny town in West Virginia has resigned amid a firestorm over racist comments about Michelle Obama, according to the town recorder.

Clay Mayor Beverly Whaling, who had commented approvingly on a Facebook post comparing the first lady to an ape, turned in her letter of resignation Tuesday. Joe Coleman, the town recorder, said Whaling's resignation was effective immediately, according to the AP.

The mayor's resignation came one day after the director of a local, government-funded nonprofit was removed from her position over her Facebook post.

After Donald Trump's election as president, Pamela Ramsey Taylor, director of the Clay County Development Corp., took to Facebook to comment on the upcoming shift from Obama to Melania Trump, writing: "It will be so refreshing to have a classy, beautiful, dignified First Lady back in the White House."


She added: "I'm tired of seeing a Ape in heels."

NBC affiliate WSAZ reported that Whaling, the mayor, then replied, "Just made my day Pam."

The comments were later deleted - and both women's Facebook pages were eventually removed, according to local reports - but images of Taylor's post and the mayor's response had already gone viral.

Taylor told ABC affiliate WCHS that she was put on leave; but a representative of Clay County Development Corp., a nonprofit that receives state and federal money, said Monday that the board "removed" Taylor from her position as director and appointed Leslie McGlothlin to take her place.

When asked by The Post how to contact Taylor, the nonprofit representative said he did not know because Taylor no longer worked there. McGlothlin did not respond to a request for comment.

Joshua Shamblin, a former council member, said Tuesday that "the county is sorry that this has been placed upon everyone instead of just the few who made hurtful remarks."

He added that local officials were "shocked" by the incident but were prepared to move forward.

The mayor's resignation followed intense criticism, with more than 150,000 people signging an online petition calling for the mayor's termination.

Whaling apologized in a statement sent Monday to The Washington Post, writing: "My comment was not intended to be racist at all. I was referring to my day being made for change in the White House! I am truly sorry for any hard feeling this may have caused! Those who know me know that I'm not of any way racist!

"Again, I would like to apologize for this getting out of hand!"

Clay Town Councilman Jason Hubbard told the Charleston Gazette-Mail that town officials planned to discuss the incident Tuesday night at a previously scheduled council meeting.

Taylor could not be reached for comment, but WSAZ reported that she issued an apology.

She also told WSAZ that the heated public response to her Facebook post had become a "hate crime against me," explaining that she and her children had received death threats. Taylor said she is planning to file a lawsuit against people who have slandered or libeled her, according to the news station.

The station reported that Taylor said she understood why her post may have been interpreted as racist, but that was not her intention. She said she was referring to her own opinion about the first lady's attractiveness, not about the color of her skin, according to the news station.

There is a long and ugly history of comparing black people to primates.

"In the 19th century and well into the 20th, popular media from movies to fiction to political cartoons frequently portrayed blacks as more simian than human," social psychologists Phillip Atiba Goff and Jennifer L. Eberhardt wrote in the Los Angeles Times. "It was an association that provided cover for slavery itself, as well as anti-black violence. Lynchings in the United States were often justified by relying on this dehumanizing association, and it surfaced in the Rodney King controversy in Los Angeles: LAPD Officer Laurence Powell had referred to a black couple as 'something right out of "Gorillas in the Mist" ' moments before he was involved in the King beating.

"Like nooses, the 'N-word' and white sheets, referring to blacks as apelike is among the most violent and hurtful legacies of our nation's difficult racial past."

Racist primate memes have surfaced repeatedly around the Obamas. Several years ago, the Awl catalogued them in a piece called "Primate in Chief: A Guide to Racist Obama Monkey Photoshops."

The town of Clay, outside of Charleston, has approximately 467 residents, according to a 2015 census estimate. The estimated population of Clay County is 8,910.

Two-tenths of 1 percent of Clay County's residents are African American, according to census data. More than three-quarters of the presidential votes cast in the county went to Trump.