US President Donald Trump's former personal lawyer Michael Cohen has accused him of breaking the law while in office and said for the first time that Mr Trump knew in advance about a WikiLeaks dump of stolen emails that hurt his 2016 election rival Hillary Clinton.

In a dramatic televised hearing in Congress, Cohen said Mr Trump approved hush payments to cover up extra-marital sexual relationships in violation of campaign finance laws, and signed a personal check for $35,000 in 2017 to reimburse Cohen for at least one of those payments.

Cohen, 52, was a close aide of Mr Trump for years and his testimony could increase the legal and political pressure on the Republican president, but he did not appear to reveal a "smoking gun" that would sink his former boss.

Cohen told a House of Representatives committee he had no direct evidence that Mr Trump or his campaign colluded with Russia during the election campaign.

Possible collusion is a key theme of Special Counsel Robert Mueller's Russia investigation, which has dogged the president during his two years in office.

Mr Trump has repeatedly denied the allegation, as has the Kremlin.

Assailing the president as a "conman" and a "cheat", Cohen said Mr Trump knew ahead of time about WikiLeaks' release of emails in 2016 that undermined Mrs Clinton's presidential bid.

He also said Mr Trump directed negotiations for a real estate project in Moscow during the White House race even as he publicly said he had no business interests in Russia.

"I wouldn't use the word colluding," Cohen said of Mr Trump's dealings with Russia, adding that there was "something odd" about the president's good relationship with Russian President Vladimir Putin.

The White House had no comment on Cohen's testimony but Mr Trump earlier accused his former employee of lying.

We need your consent to load this rte-player contentWe use rte-player to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences

Cohen's testimony on Donald Trump - the main points

"He did bad things unrelated to Trump. He is lying in order to reduce his prison time," mr Trump wrote on Twitter from Vietnam, where he was meeting with North Korean leader Kim Jong Un.

Republican lawmakers at the hearing tried to undermine Cohen, portraying him as an irredeemable liar who had benefited from financial crimes he pleaded guilty to last year, and saying the hearing was an opening gambit in a Democratic push to impeach Mr Trump.

"I don’t believe Michael Cohen is capable of telling the truth," said Republican Representative James Comer.

Cohen was mostly calm and contrite under the heated questioning from Republicans, and cautioned them not to make the same mistake he did in protecting Mr Trump.

"I did the same thing as you're doing now, for 10 years. I protected Mr. Trump for 10 years," Cohen told the committee hearing.

"The more people that follow Mr. Trump as I did blindly are going to suffer the same consequences that I am suffering."

Cohen was one of Mr Trump's closest aides and fiercest defenders, working with him on business and personal deals for a decade.

But he turned against him last year and is co-operating with prosecutors after pleading guilty to tax evasion, bank fraud and campaign finance violations. Democrats took control of the House after last year's midterm elections and called Cohen to testify.

"I am ashamed because I know what Mr Trump is. He is a racist. He is a conman. He is a cheat," Cohen said.

He said he was directed by Mr Trump in 2016 to make a $130,000 payment to adult film star Stormy Daniels to cover up an extra-marital affair.

That payment could amount to an illegal in-kind contribution by Cohen to the campaign because it exceeded donation limits and was not disclosed in Mr Trump's campaign finance reports, legal experts say.

Mr Trump has denied having sex with Ms Daniels and said the payments to her and another woman who claimed an affair were not illegal.

Cohen turned over to the committee a copy of a $35,000 check Mr Trump signed on 1 August 2017, one in a series he said was to reimburse him for paying off Ms Daniels after Mr Trump took office.

Cohen said Trump's eldest son, Donald Trump Jr, co-signed another check, again for $35,000. A lawyer for Mr Trump Jr did not respond to a request for comment.

The sweeping claims against Mr Trump, from a man who once said he would take a bullet for his boss, come as Mr Mueller appears to be close to completing his investigation into possible collusion between Mr Trump's campaign and Russian efforts to sway the vote.

Mr Trump has repeatedly called the Mueller investigation a "witch hunt."

US officials have said the emails released by WikiLeaks were stolen by Russia as part of Moscow's campaign of hacking and propaganda during the presidential race aimed at sowing discord in the US and harming Mrs Clinton.

Mr Trump has previously denied knowing in advance about the release of hacked Democratic National Committee emails during the election.

Cohen said he was in Mr Trump's office in July 2016 when Roger Stone, a self-described "dirty trickster" and longtime political adviser to Mr Trump, called the then Republican presidential candidate.

Cohen said Mr Stone told Mr Trump he had been speaking with WikiLeaks founder Julian Assange, who told him there would be a dump of emails within a couple of days that would damage Mrs Clinton's campaign.

The DNC emails drove a wedge between supporters of Mrs Clinton and her rival for the Democratic presidential nomination, Senator Bernie Sanders. Although Mrs Clinton won the nomination, that rift weakened her candidacy.

"Mr Cohen's statement is untrue," Mr Stone said in an email, but did not specify which parts of the statement he meant.

Mr Stone was indicted by Mr Mueller on charges of lying to Congress about his communications with others related to WikiLeaks email dumps.

Cohen apologised for initially lying to Congress in 2017, when he said efforts to build a Trump skyscraper in Moscow had ceased by January 2016. He now says they continued through June 2016, during the height of the election campaign, and that Mr Trump's lawyers "reviewed and edited" those false statements to Congress.

Cohen said Mr Trump on multiple occasions inquired about the Moscow real estate project while telling the public he had no business dealings in Russia.

"He lied about it because he never expected to win the election. He also lied about it because he stood to make hundreds of millions of dollars," Cohen said.