Donald Trump has said it was "unheard of and perhaps illegal" for his lawyer to tape him, following reports that he was secretly recorded discussing payments to a Playboy model who claimed they had had an affair.

In a joint attack, the US leader criticised his former attorney and long time confidante Michael Cohen and special counsel Robert Mueller's investigation into Russian meddling in the 2016 election, on Twitter.

The US leader also insisted that "your favourite president" had done "nothing wrong".

Mr Cohen's office was raided by the FBI in April as part of the ongoing probe. Mr Trump has already denounced the move as a "disgraceful situation".

A New York Times report had since suggested that an audio recording seized by investigators includes Mr Trump discussing alleged hush money provided to former Playboy model Karen McDougal two months before his election victory.

If accurate, the tape would directly contradict statements the president made in which he claimed to be unaware of any payments to women during the election.

The recording may also provide evidence indicating Mr Trump willfully violated campaign finance laws in an apparent effort to silence a woman who has claimed that she had a nearly year-long affair with him.

Mr Trump however insisted that he "did nothing wrong" after referring himself as "your favourite President" in a tweet.

"Inconceivable that the government would break into a lawyer’s office (early in the morning) – almost unheard of," Mr Trump wrote.

"Even more inconceivable that a lawyer would tape a client – totally unheard of & perhaps illegal. The good news is that your favourite President did nothing wrong!"

Ex-Playboy model who alleges affair with Trump: He said I was 'beautiful' like Ivanka

Rudy Giuliani, another of the president’s lawyers, confirmed the recording existed but said it showed no wrongdoing on Mr Trump’s part.

Ms McDougal claimed to have begun an affair with Mr Trump in 2006, a year after he married Melania Trump. She said Mr Trump initially offered money in exchange for sex.

Trump in Helsinki: Putin meeting and protests Show all 16 1 /16 Trump in Helsinki: Putin meeting and protests Trump in Helsinki: Putin meeting and protests President Trump meets with Russian President Vladimir Putin in Helsinki Reuters Trump in Helsinki: Putin meeting and protests An advert from Finnish newspaper Helsingin Sanomat is on display in Helsinki Reuters Trump in Helsinki: Putin meeting and protests President Trump in a meeting with Finnish President Sauli Niinisto AFP/Getty Trump in Helsinki: Putin meeting and protests President Trump meets with Finnish President Sauli Niinisto in Helsinki EPA Trump in Helsinki: Putin meeting and protests President Trump talks with Finnish President Sauli Niinisto in Mantyniemi, the official residence of the Finnish President EPA Trump in Helsinki: Putin meeting and protests US, Finnish and Russian flags fly in front of the Presidential Palace in Helsinki EPA Trump in Helsinki: Putin meeting and protests A protester wears a mask featuring a portrait of Russian President Vladimir Putin during the so-called "Helsinki against Trump and Putin" demonstration on July 16, 2018, in the Finnish capital Helsinki. The US and Russian leaders opened an historic summit in Helsinki on Monday, with Donald Trump promising an "extraordinary relationship" and Vladimir Putin saying it was high time to thrash out disputes around the world. / AFP PHOTO / Jonathan NACKSTRANDJONATHAN NACKSTRAND/AFP/Getty Images JONATHAN NACKSTRAND AFP/Getty Trump in Helsinki: Putin meeting and protests Vladimir Putin gifts a football to President Trump at the press conference that followed their meeting AP Trump in Helsinki: Putin meeting and protests Trump supporters hold banners during a demonstration in Helsinki AFP/Getty Trump in Helsinki: Putin meeting and protests People protest for women's reproductive rights in Helsinki's Senate Square Reuters Trump in Helsinki: Putin meeting and protests A crowd watches the motorcade transporting President Trump through Helsinki AFP/Getty Trump in Helsinki: Putin meeting and protests Russian President Putin drives through Helsinki on his way to meet with President Trump EPA Trump in Helsinki: Putin meeting and protests A man in the audience of the joint press conference holds up a sign sign that reads "NUCLEAR WEAPON BAN TREATY". REUTERS Trump in Helsinki: Putin meeting and protests A man is removed from the joint press conference in Helsinki. Security removed the man after he pulled out a sign that read "NUCLEAR WEAPON BAN TREATY". REUTERS Trump in Helsinki: Putin meeting and protests President Trump and Russia's President Putin sit for a working lunch in Finland's Presidential Palace AFP/Getty Trump in Helsinki: Putin meeting and protests President Trump meets with Russian President Vladimir Putin in Helsinki Reuters

In an interview with CNN, the former model said she felt “guilty” and ended the affair after almost 10 months in April 2007.

Stormy Daniels, an adult film star and director, also claimed to have received payments to remain silent about her alleged affair with Mr Trump.

The investigation headed by Robert Mueller, which began in May 2017, is examining possible links between Donald Trump's presidential campaign and the Russian government.

So far it has resulted in charges against 32 people including the president's former campaign chairman Paul Manafort and former National Security Advisor Michael Flynn.