The lawyer for President Trump’s longtime personal attorney said his counterpart in Stormy Daniels’ lawsuit is a “PR machine” who’s keeping the porn star’s allegations of a sexual affair with the president in the headlines despite the story being “nonsensical.”

“I give this guy credit for one thing … he’s made the best out of this story. This guy is a PR machine. And he’s only in it for himself,” David Schwartz, the lawyer for Michael Cohen, told AM 970 host John Catsimatidis about Daniels’ attorney, Michael Avenatti, in an interview that aired Sunday.

Avenatti has been making the rounds of network and cable news shows to discuss the defamation lawsuit Daniels has filed against Cohen as part of a $130,000 “hush payment” he made to her a little more than a week before the 2016 election.

Avenatti said the payment was intended to keep Daniels — whose real name is Stephanie Clifford — from speaking about a sexual affair she claims she had with Trump after meeting him at a golf tournament in 2006.

Schwartz said the payment was “completely legal” and he blamed Avenatti of making “a mountain out of a molehill.”

Avenatti said a nondisclosure agreement Daniels entered into with Cohen and Trump is invalid because the president — identified as David Dennison in the court papers — never signed the deal.

Cohen has said he made the payment with money from his own pocket and wasn’t reimbursed by Trump, his campaign or the Trump Organization.

The White House has denied Daniels’ allegations.