“I’d like her to return to being a male and let loose in the outback of Zimbabwe where she lives comfortably in a cave with Maxie, the gorilla,” he said.

Condemnation of the remarks was swift on social media and among elected officials around the state. The local county executive called for Mr. Paladino to immediately resign his post on the Buffalo school board.

Gov. Andrew M. Cuomo, a Democrat who defeated Mr. Paladino in 2010, called the comments “racist, ugly and reprehensible.” He said in a statement that Mr. Paladino had a “long history” of making similar comments and that he had “embarrassed the good people of the state with his latest hate-filled rage.”

Mr. Trump did not personally step to the defense of Mr. Paladino, who served as a New York co-chairman of the president-elect’s campaign and describes himself as a personal friend of Mr. Trump’s. “Carl’s comments are absolutely reprehensible, and they serve no place in our public discourse,” Jessica Ditto, a spokeswoman for Mr. Trump, said.

Mr. Paladino conducted several media interviews, framing his comments about the Obamas as “old-style humor” in an interview with a Buffalo television news station and as an effort to draw attention to the president’s “transgressions” in a telephone interview with The New York Times.