Former U.S. House Speaker Dennis Hastert pleaded guilty on Wednesday to lying to the FBI and agreed to take the second count of a federal indictment in a hush-money case.

Hastert pleaded guilty to "structuring," or evading requirements for banks to report large cash transactions, reported CNBC. Hastert admitted that he knew he was doing something wrong when he "structured" bank withdrawals.

Prosecutors are expected to drop a charge that Hastert violated federal banking laws in exchange for his plea.

Hastert led the House for eight years before retiring in 2007. He was indicted on May 28, accused of handing as much as $100,000 in cash at a time to someone identified as "Individual A" to conceal "prior misconduct," the indictment says, according to the Associated Press.

The indictment only hints at Hastert's alleged wrongdoing, but federal law enforcement sources have said "Individual A" was a student at Yorkville High in Illinois while Hastert was a wrestling coach and teacher there decades ago and that the misconduct was sexual in nature, according to the Chicago Tribune.

Prosecutors asked for a prison sentence of up to six months for the ex-speaker, but Hastert may receive up to five years in prison if the judge decides to go beyond that recommendation.

Hastert will remain free on bail pending a sentencing hearing on Feb. 29.