Defense attorneys for Donald Trumps former campaign chief Paul Manafort, on trial for tax and bank fraud, attacked the credibility of the key prosecution witness as he wrapped up three days of grueling testimony on Wednesday.

Rick Gates, Manafort's long-time deputy, acknowledged having made "many mistakes over many years" but insisted he was telling the court the truth about the alleged financial misdeeds of his former boss.

Gates, 46, has pleaded guilty to conspiracy and is cooperating with the government as it prosecutes Manafort for allegedly evading US taxes on tens of millions of dollars earned from political consulting work they did together in Ukraine from 2006 to 2014.

Manafort, 69, a veteran Republican political operative, was Trump's campaign chairman from May to August 2016, when he was forced to step down amid questions about his work for Ukraine's former pro-Russian leader Viktor Yanukovych.

Although Manafort is not on trial for anything he did while working for Trump, the case is being seen as a key test for the investigation into Russian interference in the 2016 presidential election by Special Counsel Robert Mueller, who brought the charges.

Gates pleaded guilty in February to conspiracy and making false statements in exchange for his testimony against Manafort and cooperation with the Special Counsel's office.

Kevin Downing, Manafort's lead defense attorney, sought to undermine Gates' credibility in the eyes of the jury on Tuesday, pressing him about embezzling money from Manafort and an extramarital affair.

Gates, who is married and has four children, acknowledged having had a "relationship" a decade ago and admitted to stealing from his boss during a "difficult time" in his life by inflating personal expenses.

On Wednesday, after eliciting an admission from Gates that his plea agreement could be thrown out if he lied, leading to further charges, Downing asked him if had told the Special Counsel "that you actually engaged in four extramarital affairs?"

Prosecutor Greg Andres immediately objected and Downing did not return to the subject after a hushed consultation among the lawyers with Judge T.S. Ellis.

Donald Trump's former campaign chief, Paul Manafort, seen here in a June 2018 file photo, is on trial for tax and bank fraud

During his three days of testimony, Gates laid out in detail how payments to Manafort's company from political work in Ukraine were made to bank accounts in Cyprus and the money was never reported to accountants or the Internal Revenue Service.

Closing arguments before the six-man, six-woman jury hearing the case in federal court in Alexandria, Virginia, could be later this week.

Mueller, a former FBI director, has indicted more than 30 people -- including 26 Russians -- in connection with his probe into whether members of Trump's campaign colluded with Russia to help get the real estate tycoon elected.

While Gates and others have pleaded guilty, Manafort has refused to strike a deal and legal experts say he may be holding out hopes of a pardon from Trump.

Trump has denounced the probe as a politically motivated "witch hunt" and denied there was any collusion with Moscow to defeat Democratic presidential nominee Hillary Clinton.