DONALD Trump said his ex-lawyer Michael Cohen may have acted illegally after it emerged he had secretly taped a discussion about payments to a former Playboy model who claims she had an affair with the US president.

In his first direction reaction to a report broken by The New York Times a day earlier, Mr Trump added: “The good news is that your favourite President did nothing wrong!”

The Times reported the FBI had seized the recording during a raid on Mr Cohen’s office earlier this year, quoting lawyers and others familiar with the recording. Mr Cohen has not yet been arrested or charged.

“Inconceivable that the government would break into a lawyer’s office (early in the morning) — almost unheard of,” Mr Trump tweeted.

“Even more inconceivable that a lawyer would tape a client — totally unheard of & perhaps illegal.”

That is what he said in public. In private, Mr Trump was reportedly stunned.

“I can’t believe Michael would do this to me,” the president said, according to a follow-up report from the Times.

Former Playboy model Karen McDougal claims she had a months-long affair with Mr Trump after they met in 2006, shortly after Mr Trump’s wife Melania gave birth to their son Barron. She told CNN previously that he tried to pay her for sex.

The Wall Street Journal said the September 2016 conversation between Mr Trump and Mr Cohen was about buying the rights to McDougal’s story, which she sold a month earlier to The National Enquirer for $US150,000 ($203,000).

The tabloid ultimately sat on it, preventing it from becoming public. The chairman of its parent company, American Media, is a friend of Mr Trump’s.

Friday’s reports raised questions about why Mr Trump’s campaign denied knowledge of the deal between McDougal and American Media when it became public and fanned speculation about how much damage Mr Cohen can inflict on the president.

Mr Trump’s current personal lawyer, Rudy Giuliani, had confirmed to the Times that the Cohen tape existed, but said it showed the president had done nothing wrong.

“The transaction that Michael is talking about on the tape never took place, but what’s important is: If it did take place, the president said it has to be done correctly and it has to be done by check” to keep a proper record of it, Mr Giuliani said.

Transparency groups and Democrats have argued that the secret efforts to silence Trump accusers, including a payment to adult film actress Stormy Daniels, should be investigated by the Federal Election Commission as potential violations of campaign finance laws, which require disclosure of campaign expenditures.

Mr Trump’s attorneys have argued that any payments to accusers would have been made regardless of his presidential candidacy, and that no violation occurred.

The recording could also further entangle the president in a criminal investigation that for months has targeted Mr Cohen.

The erstwhile Trump loyalist has hired a new attorney, Clinton White House veteran Lanny Davis, and disassociated himself from the president as both remain under investigation.

Mr Davis said “any attempt at spin cannot change what is on the tape.” “When the recording is heard, it will not hurt Mr. Cohen,” Davis said in a statement.

The FBI raided Mr Cohen’s office, home and hotel room in April, searching in part for information about payments to Ms McDougal and Ms Daniels, who received a $130,000 payment from Mr Cohen before the election to keep quiet about a sexual relationship she says she had with Mr Trump.

The FBI investigation is separate from special counsel Robert Mueller’s probe of election interference in 2016 and potential obstruction of justice by those in the president’s orbit.

A self-described fixer for Mr Trump for more than a decade, Mr Cohen said last year he would “take a bullet” for the president.

But he told ABC News in an interview broadcast this month that he now puts “family and country first” and won’t let anyone paint him as “a villain of this story”.

On Twitter, he scrubbed mentions and photos of Mr Trump from a profile that previously identified him as “personal attorney to President Donald J. Trump”.