YORKVILLE, Ill. — J. Dennis Hastert, the longest-serving Republican speaker in the history of the U.S. House, was indicted Thursday by a federal grand jury on charges that he violated banking laws in a bid to pay $3.5 million to an unnamed person to cover up “past misconduct.”

Hastert, who has been a high-paid lobbyist in Washington since his 2007 retirement from Congress, schemed to mask more than $950,000 in withdrawals from various ac­counts in violation of federal banking laws that require the disclosure of large cash transactions, according to a seven-page indictment delivered by a grand jury in Chicago.

The indictment did not spell out the exact nature of the “prior misconduct” by Hastert, but it noted that before entering state and federal politics in 1981, Has­tert served for more than a decade as a teacher and wrestling coach at Yorkville High School in Illinois.

In 2010, confronted about the “prior misconduct,” the former speaker agreed to pay $3.5 million to the person “to compensate for and conceal his prior misconduct against Individual A,” prosecutors alleged.

That person, whose identity was shielded by prosecutors, has known Hastert most of his or her life, growing up in Yorkville, the city next to Hastert’s home town of Plano, in the exurbs west of Chicago. Prosecutors said the actions “occurred years earlier” than the 2010 meeting that sparked the payments.

[Jaw-dropping indictment stirs deeper mystery]

The investigation began in 2013, by the FBI and the Internal Revenue Service, which cited “possible structuring of currency transactions to avoid the reporting requirements.”

Neither Hastert nor his legal team responded to requests for comment on the charges.

Hastert, an easygoing Midwesterner by nature, had a public persona closely linked to his career as a wrestling coach, something he cited in late 2007 in his final speech on the House floor.

“When I entered politics, I never envisioned that this former teacher and wrestling coach from Kendall County, Illinois, would have the opportunity to lead the United States House of Representatives,” he said at the time.

In addition to the banking charges, Hastert faces a count for making “false, fictitious and fraudulent statements” to federal investigators during an interview last December in which he was questioned about the many cash withdrawals for less than $10,000, just under the amounts that would have triggered disclosure requirements.

According to the indictment, investigators asked Hastert — an almost 21-year veteran of Congress whose lobbying clients include major energy and tobacco firms — whether his withdrawals were prompted “because he did not feel safe with the banking system.”

“Yeah . . . I kept the cash,” the former speaker told the agents, according to the indictment. “That’s what I’m doing.”

Over five years, Hastert withdrew about $1.7 million in cash from his various bank accounts — at one point in 2014 delivering $100,000 a month to the person in question, the indictment alleged. About half of the cash was withdrawn illegally, prosecutors said.

Prosecutors alleged that he knew he was withdrawing the money “to compensate Individual A to remain secret so as to cover up his past misconduct.”

Kim Nerheim, spokeswoman for the U.S. attorney’s office for the Northern District of Illinois, which brought the charges, would not comment on whether there was any criminal investigation or charges against the person who prompted Hastert’s allegedly illegal transactions.

The withdrawals in question began in June 2010, including 15 of $50,000 each, until the spring of 2012, according to the indictment. Officials at the bank asked Hastert about those cash transactions, because federal law requires reporting of transactions of $10,000 or more as part of efforts to track money laundering and other criminal behavior. Shortly thereafter, Hastert began making regular withdrawals of less than $10,000, the indictment alleged.

Hastert will be arraigned in a federal district court, Nerheim said. She did not say when.

Friends and associates of the former speaker were shocked by the allegations. His lobbying firm, Dickstein Shapiro, announced his resignation after the news broke Thursday.

“It’s a shock to me as much as anybody,” said Loren Miller, a longtime friend of Hastert’s from Illinois. “He got his job because he didn’t have any skeletons in his closet.”

Speaking at his home in Yorkville, Ill., Thursday night, Miller said “there wasn’t anything wrong” when Hastert last visited about a week ago.

Miller first knew Hastert when he played high school football against him in the early 1960s — Hastert for Oswego High, Miller for Yorkville. They later became close when Hastert entered political life, inviting Miller for trips to Washington and occasionally sharing perks like holiday baskets and a trip to the Kentucky Derby.

“I was one of his closest friends and got to do a lot of things, but nothing that wasn’t on the level,” he said.

Hastert would pay regular visits to Miller’s auto restoration shop, though the visits became less frequent in recent years as Hastert spent more time in Washington, Miller said.

“I don’t know the details, but I know what the man is made of, and I know that I will stand behind him.”

Miller said it was “too soon” even for rumors to spread on what Hastert’s long-ago misdeeds might have been. “I’ll know what probably comes out in the news,” he said.

Scot Bertram, a conservative radio host in Illinois, said being a teacher “was connected with Hastert at the hip. Any quick bio piece, any speech, it always came up. Any shadow on that would be devastating to him,” he said.

“I find it unbelievable and totally out of character with the Denny I know and worked with,” said Brian Finch, a lobbyist who worked with Hastert for about six years when both were at Dickstein but who now works at the law firm Pillsbury Winthrop Shaw Pittman. “I always found him to be an upstanding and honorable person.”

Former Virginia congressman Thomas J. Bliley Jr. said in an interview Thursday that he was “very sad” to hear about Hastert’s situation. He recalled Hastert as a congressional leader who was amiable but not prone to say much about himself or his past. “He wasn’t overly talkative, but not a recluse, somewhere in between,” he said. “We knew him as a coach, as a friend.”

Hastert’s ability to make such large cash payments probably came from his career as a K Street lobbyist. He entered Congress in 1987 with a net worth of no more than $270,000 and then exited worth somewhere between $4 million and $17 million, according to congressional disclosure documents. Much of his wealth, however, was tied up in real estate holdings.

Since Hastert became a lobbyist, his clients have paid millions of dollars for his services.

Last year, Hastert took the helm of Dickstein’s lobbying practice at a time when it was undergoing major structural changes.

A large group of lobbyists had departed for rival Greenberg Traurig, taking significant business, and Hastert was tapped to help rebuild Dickstein’s lobbying business.

His clients included Peabody Energy, the Secure ID Coalition and Fuels America, according to lobbying records.

Hastert became speaker at a time of great tumult among House Republicans. After the disappointing 1998 midterm elections, Rep. Newt Gingrich (R-Ga.) resigned as House speaker. The following the disappointing 1998 midterm elections, impeachment charges against President Bill Clinton led to revelations that Gingrich’s would-be replacement, Rep. Bob Livingston (R-La.), had engaged in extramarital affairs. He was forced to resign.

Hastert became the unity candidate to take over. On the evening of the 9/11 terrorist attacks, Hastert led lawmakers in a ceremony at the Capitol steps, ending with an impromptu singing of “God Bless America” that became a rallying cry in some circles.

He stepped down after Republicans lost the House majority in the 2006 midterm elections. Those elections took place in the middle of an investigation into the GOP leadership’s handling of allegations that a Republican Florida congressman, Mark Foley, had engaged in inappropriate ­explicit communications with House pages, who were of high school age.

In his farewell address, Hastert again invoked his wrestling background.
“There’s a tradition among Olympic wrestlers that you leave your shoes on the mat after your last match,” he said. “Well, don’t be alarmed, Madam Speaker, I won’t be challenging the rules of decorum by removing my shoes on the House floor. But I do hope that I have left a few footprints behind that may be of value to those who come after me.”

Kane and Berman reported from Washington. Robert Costa, Alice Crites, Matea Gold, Rosalind S. Helderman, Catherine Ho and Sari Horwitz in Washington contributed to this report.