House Speaker Paul D. Ryan (R-Wis.) rebuked President Trump for calling adult-film actress Stormy Daniels “Horseface,” saying in an interview that aired Wednesday, “There’s no place for that kind of language.”

Ryan’s comments stood out in the aftermath of Trump’s tweet Tuesday cheering the dismissal of Daniels’s defamation lawsuit against him. Trump’s accompanying insult was largely met with silence from fellow Republicans.

“There’s no place for that,” Ryan said during an interview with “CBS This Morning.” “There’s no place for that kind of language. He should not have said that.”

Trump’s insult of Daniels, who was paid off in 2016 to remain silent about an alleged affair with Trump, was just the latest example of a long-standing pattern of attempting to undercut female adversaries with jabs at their physical appearance.

The episode comes just three weeks before the midterm elections, in which Republicans are struggling to attract female voters, particularly in the suburbs, in defense of the GOP’s majorities in Congress. The risk of losing the House is considered significantly higher.

Ryan, who is retiring at the end of this term, predicted during his CBS interview, which was recorded Tuesday, that Republicans will maintain control of the House.

“I feel pretty good about it,” he said. “I think our voter enthusiasm is where it needs to be and more importantly we have a great record to run on.”

He defended the Republican tax cut law, which recent polls have shown is not widely popular with voters.

Ryan appeared alongside Rep. Elise Stefanik (R-N.Y.), who agreed that Trump’s remark about Daniels was “unacceptable.” She said female voters can be won over by Republican accomplishments in Congress, however.

“I think this election is going to be focused on results rather than resistance,” Stefanik said.

Trump’s tweet in which he referred to Daniels as “Horseface” followed a legal defeat for Daniels, whose defamation lawsuit against Trump was dismissed by U.S. District Judge S. James Otero on Monday. Daniels had argued that Trump defamed her by suggesting she lied when she said she was threatened not to speak about their alleged relationship.

Still pending is another Daniels lawsuit, which seeks to void a 2016 nondisclosure agreement meant to prevent Daniels from discussing her alleged affair with Trump.

During the CBS interview, Ryan also said in response to a question by interviewer John Dickerson that Trump’s political rallies can be divisive “sometimes.”

“I worry about tribal identity politics becoming the new norm of how politics is waged,” Ryan said, adding that Trump has done some things to unite the country, including fostering economic growth and supporting the military.

Elise Viebeck and Ashley Parker contributed to this report.