Microsoft co-founder Bill Gates told Congress on Wednesday that he "didn't fully understand" the extent of Epstein's crimes when he dated the late sex offender Jeffrey Epstein to raise money for his charitable foundation. Gates also testified that he never witnessed any criminal behavior by Epstein and accused Epstein of using his extramarital affairs to blackmail him.

"These matters had nothing to do with my association with Epstein, but they caused pain to my family," Gates said, according to a copy of his opening statement. "Epstein was trying to use the information about my affair — and the many lies he had concocted — to force me to reengage with him."

Gates has previously testified privately to the House Oversight and Government Reform Committee. The committee is investigating possible mismanagement by the federal government in the case of Epstein and his associate Ghislaine Maxwell and related issues.

Republican Rep. James Comer, the committee chairman, invited Gates to testify in a March letter and accepted a written record.

Gates reportedly hired Jake Greenberg to assist him in preparing for the hearing. Greenberg previously served as the chief investigative officer of the House Oversight Committee until his departure in December. A spokesman for the commission said it has not worked with Greenberg since his departure.

Documents released by the U.S. Department of Justice this year showed that Gates and Epstein met multiple times after Epstein was released from prison in 2008 to discuss how to expand the technology billionaire's philanthropy.

The documents also include photos of Gates posing with women whose faces have been blacked out. Gates has previously said his relationship with Epstein was limited to philanthropic discussions and called meeting Epstein a mistake.