Lawyers for President Trump will argue in Los Angeles federal court Monday that they rang up hefty bills defending the commander-in-chief against Stormy Daniels’ defamation claim — because of attorney Michael Avenatti’s aggressive tactics.

Trump’s lawyers are suing the porn star for $340,000 in legal fees after a federal judge tossed out her defamation suit against him in October.

The attorneys calculated more than 500 hours of work — at rates as high as $840 an hour. They say the bills added up as a result of ploys by Avenatti, who is representing Daniels.

“This action is virtually unprecedented in American legal history,” wrote Trump’s lead attorney, Charles Harder.

“[Daniels] not only brought a meritless claim for defamation against the sitting president of the United States, but she also has engaged, along with her attorney, in massive national publicity.”

The adult film star, whose real name is Stephanie Clifford, alleges she had a one-night stand with Trump in 2006 and was paid $130,000 to keep mum about the tryst. Trump has denied the affair.

She also claimed that she was threatened by a man in a Las Vegas parking lot to remain quiet about the alleged affair — and sued the president in April after he tweeted that the claim was a “total con job.”

U.S. District Judge S. James Otero ruled in October that Trump’s statement was “rhetorical hyperbole” and protected under the First Amendment. He ordered Daniels to pay the president’s legal fees.

Avenatti claims the fees are “staggering and grossly inflated” and shouldn’t exceed $25,000.

With Post wires