WASHINGTON — President Donald Trump is insulting the physical appearance of porn actress Stormy Daniels, calling her “Horseface” in a tweet about a recent legal ruling.

A federal judge dismissed Daniels’ defamation lawsuit against Trump.

Daniels alleges she had an affair with Trump in 2006 and sued him in April. The defamation lawsuit came after Trump tweeted about a composite sketch of a man Daniels says threatened her in 2011 to keep quiet about an alleged affair. He called it a “total con job.”

The judge on Monday said Trump’s tweet was a “hyperbolic statement” protected under the First Amendment.

Trump tweeted: “Great, now I can go after Horseface and her 3rd rate lawyer.”

Daniels’ attorney Michael Avenatti called Trump’s comments “outrageous.”

Trump has a history of derogatory comments about women’s appearances.