John C. Fry, who worked as an investigative analyst for the IRS’s law enforcement arm, admitted he knowingly and willingly disclosed confidential information to celebrity attorney Michael Avenatti, his plea agreement says, according to a statement from the US attorney’s office in the Northern District of California.

Fry faces a maximum of five years in prison and a $250,000 fine, according to the Justice Department. US District Judge Edward M. Chen scheduled Fry’s sentencing for December 18, 2019.

The former analyst admitted to accessing a private government database from his work computer on May 4, 2018, and downloading five suspicious activity reports, or SARs, related to Michael Cohen and his company Essential Consultants, authorities say. Banks file a SAR when they review transactions that raise red flags.

    Fry, who admitted he had no official reason to disclose the records, then called Avenatti twice from his personal cell phone and verbally provided information about the contents of the reports, according to the Justice Department. Fry also sent email screenshots of the reports to Avenatti from a personal email account.

    Days later, on May 7, 2018, authorities say Fry conducted additional searches on Cohen and his company on the database and called Avenatti and again verbally provided his findings to him.

    Cohen’s bank transactions became public last May when Avenatti posted a memo online outlining numerous payments to Cohen from a company linked to a Russian oligarch, pharmaceutical giant Novartis, AT&T, which owns CNN, and others.

    The payments went through a shell company Cohen created that he also used to make hush money payments to Avenatti’s client, adult-film actress Stormy Daniels, to silence her allegations of an affair with Trump. Trump has denied the affair. At the time, Cohen’s attorney alleged his bank records were illegally obtained.

    A federal grand jury indicted Fry earlier this year with one count of unauthorized disclosure of suspicious activity reports, two counts of misuse of a computer, and one count of illegal use of a social security number. Fry pleaded guilty on Wednesday to the unauthorized disclosure count, according to the NDCA, and if he complies with the plea agreement, the remaining counts will be dismissed at sentencing.

      Cohen is currently serving a three-year prison sentence for crimes that included arranging payments during the 2016 election to silence women who claimed affairs with Trump.

      In May, a federal grand jury in Manhattan indicted Avenatti in two alleged schemes, charging him with fraud and aggravated identity theft involving Daniels and with attempting to extort more than $20 million from sportswear giant Nike. He has pleaded not guilty. Avenatti has also been charged in California on an array of charges including tax fraud and embezzling from clients. He has pleaded not guilty.

      CNN’s Kara Scannell and Erica Orden contributed to this report.