Rick Gates concludes his testimony against his former boss Paul Manafort Gates admitted to shielding millions of dollars in offshore accounts.

Rick Gates, the former campaign aide to President Donald Trump, wrapped up his eight-hour long testimony today against his former boss Paul Manafort, who is on trial in federal court in Virginia on bank and tax fraud charges.

Manafort is accused of evading taxes on $60 million earned in overseas lobbying and consulting work for a Russian-backed Ukrainian political party. Manafort has pleaded not guilty to all charges.

During a relatively brief cross-examination Wednesday morning, Manafort's lead attorney Kevin Downing alleged that Gates had a total of four extra-marital affairs, including the one Manafort's defense team had previously described as a part of Gate's "secret" life.

Before Gates could respond, prosecutors objected on the grounds of relevance, and after a meeting at the judge's bench, the claim was never mentioned again.

On Tuesday, Gates had acknowledged from the witness stand that he used money embezzled from Manafort to finance a London apartment he used to engage in an extra-marital affair. Defense attorneys contend that Gates embezzled about $3 million from Manafort.

Throughout his three-day testimony, Gates described his part in shielding millions of dollars in more a dozen offshore accounts from United States tax collectors. Gates said he did so at Manafort's direction, and also admitted to embezzling "several hundred thousand" dollars from Manafort.

Asked if he told Manafort about the relationship in London 10 years ago, Gates said he had, and added that Manafort was supportive and that he didn’t fire him for it.

The defense on Wednesday also asked Gates about an interview he sat for with officials from the Federal Bureau of Investigation (FBI) in 2014. Gates testified that he had disclosed offshore accounts in Cyprus and the Grenadines during the interviews.

When asked if Manafort was truthful with the FBI, Gates answered, "To the best of my recollection, yes."

Special counsel prosecutor Greg Andres moved swiftly through his cross-examination of Gates on Wednesday morning. Andres asked Gates whether the government had ever charged him with embezzling, and Gates said no.

Andres also asked Gates whether Manafort had ever confronted him about the embezzlement, some of it through padded expense invoices, and Gates also said no.

Andres then asked Gates "who paid for those [expense reports] ultimately?"

"The Ukrainian businessmen," Gates responded, implying that Manafort did not pay for the expenses Gates submitted to Manafort, but that the Ukrainian businessmen reimbursed him for the fraudulent expense reports he submitted.

Gates was then asked questions about his pre-trial preparation sessions with the special counsel. Asked if he was ever "told how to answer" questions during the trial, Gates said he wasn't.

"The only answer I was told was to tell the truth."

Gates also testified that he faced consequences if he lied before the jury. Andres asked

"If you lie here today and those charges are brought again -- would you have a defense to that?", Andres asked.

"No," Gates replied.

"As you sit here today, is there any doubt in your mind that if you lie, the special counsel will rip up your plea agreement?" Andres continued.

"No there is not," Gates answered.

John D. Cohen, an ABC News contributor and a former police detective and senior federal agent at the U.S. Department of Homeland Security who has been involved in numerous federal prosecutions, said that while government witnesses who have pleaded guilty to criminal activity are never ideal, their testimony can nevertheless do a lot of damage to the defendant.

“What we witnessed with Rick Gates is pretty typical," Cohen said. "It is never ideal when a prosecutor uses as a witness someone who has engaged in criminal activity. While that witness may provide valuable insight, defense attorneys are always going to seek to undermine their credibility."

"However what is important to remember is that while these people may be criminals that doesn’t mean that they are not telling the truth while testifying.”

Next up on the stand is an FBI accountant, whose testimony is expected to last about two hours.

This is a developing story. Please refresh for details.