CHICAGO – Former House Speaker Dennis Hastert intends to plead guilty in a federal hush-money case linked to allegations of sexual misconduct from decades ago, a defense attorney told a federal judge Thursday.

A written plea agreement should be completed by Monday, attorney John Gallo said during a brief status hearing. At the attorney’s request, a federal judge set Oct. 28 as the date for Hastert to change his plea.

Defendants typically agree to plead guilty in hopes of a more lenient sentence. A plea deal for the 73-year-old Illinois Republican would also avert a trial and help keep any potentially embarrassing Hastert secrets quiet.

Neither Gallo nor prosecutors offered any details about what the plea deal might say, including which counts Hastert would plead guilty to or whether the man who was once second in the line of succession for the presidency would serve any prison time.

Hastert, who led the House for nine years, is charged with one count of breaking banking laws and one count of lying to the FBI about agreeing to pay someone $3.5 million to hide claims of unspecified past misconduct. Each count carries a maximum five-year prison term.

The Associated Press and other media, citing anonymous sources, have reported the payments were meant to conceal claims of sexual misconduct. The indictment against Hastert does not detail the underlying misconduct, and both prosecutors and defense attorneys have taken steps to keep the information confidential.

After being questioned by banking officials about large cash withdrawals, Hastert allegedly began structuring the withdrawals in increments of just under $10,000 to avoid reporting rules. He’s also accused of lying to the FBI about the reason for the withdrawals. Investigators have said Hastert withdrew about $1.7 million from 2010 to 2014.

A plea deal would mean that “Individual A,” who has never been identified, would not have to testify about receiving any of the money.

Hastert could still change his mind. Gallo told U.S. District Judge Thomas M. Durkin that the defense “reserved the right” to go to trial if talks collapse in the final days.

A main aim of Hastert’s lawyers has likely been to ensure details about his alleged misconduct are not included in the plea deal, in sentencing memos or in any other court document, said Jeff Cramer, a former federal prosecutor in Chicago.

The question of how to address motive is probably another sticking point, he added. Plea deals typically touch on motive, though in Hastert’s case that could force him to acknowledge the conduct behind the charges.

Plea deals often require a defendant to plead guilty to one count in exchange for the rest being dropped. Some deals fix a specific sentence, while others suggest a range of punishments, leaving the final call to a judge.

A sentencing date is usually set for a date after the guilty plea, though defendants are sometimes sentenced the same day. The latter could be an option Hastert prefers, allowing him to get the process over with fast.

Sentencing hearings are also the chance, in most criminal cases, for victims to step forward and talk about the effect of a crime on their lives. It’s not at all clear that there would be any input from “Individual A.”

Hastert’s lead attorney, Thomas C. Green, has argued that the allegations in the media of past sexual misconduct – which he blamed on government leaks – could undermine Hastert’s right to a fair trial.

In July, Green complained that the indictment had “effectively been amended” by leaks and referred to the sexual allegations as “an 800-pound gorilla in this case.”

It’s unclear if claims not in the indictment would have had any relevance at a trial, when prosecutors would likely have focused narrowly on mundane aspects of U.S. banking law. But they could have felt pressure to offer at least some details about the misconduct to explain motive to jurors.

When Hastert was charged in May, the indictment noted that he had been a longtime high school teacher and wrestling coach in Yorkville, west of Chicago, suggesting the charges are linked to that history.

Associated Press Writer Eric Tucker in Washington, D.C., contributed to this report.