Porn star Stormy Daniels' ex-lawyer Keith Davidson sued President Donald Trump's personal attorney Michael Cohen, saying Cohen secretly and illegally recorded phone calls with him.

Davidson also filed a counterclaim against Daniels and her current lawyer Michael Avenatti, accusing them of defaming him.

Davidson's allegations came in response to a lawsuit that Daniels filed Wednesday against him and Cohen in California federal court.

In that case, Daniels accuses Davidson of colluding with Cohen this year, without her knowledge, in an effort to get her to publicly falsely state that she did not have an affair with Trump in 2006.

That alleged collusion came more than a year after a shell company set up by Cohen paid Daniels $130,000 in exchange for what she has said was her silence about the tryst with Trump.

The payment, which Davidson negotiated with Cohen on Daniels' behalf, was made in October 2016, just weeks before the election that sent Trump to the White House.

Trump later repaid Cohen for the payment to Daniels — but spokesmen for the president said the affair never happened.

In a court filing Thursday, Davidson alleged that Cohen, whose law office is in New York City, "surreptitiously and intentionally recorded several telephone calls" with Davidson during their negotiations over the hush deal.

Davidson said the alleged recordings, made while he was in California, violated that state's Invasion of Privacy Act, which requires the consent of all parties involved to record private conversations.

Multiple media outlets have reported that the FBI seized recordings in raids on Cohen's home, office and hotel room in April as part of an ongoing criminal investigation. Cohen has not been charged with any crime.

Davidson wants Cohen to pay at least $75,000 for the costs of the lawsuit.

Brent Blakely, a lawyer for Cohen, did not immediately respond to a request for comment on Davidson's allegation.