WASHINGTON — J. Dennis Hastert, who served for eight years as speaker of the House of Representatives, was paying a former student hundreds of thousands of dollars to not say publicly that Mr. Hastert had sexually abused him decades ago, according to two people briefed on the evidence uncovered in an F.B.I. investigation.

Federal prosecutors on Thursday announced the indictment of Mr. Hastert, 73, on allegations that he made cash withdrawals, totaling $1.7 million, to evade detection by banks. The federal authorities also charged him with lying to them about the purpose of the withdrawals.

The former student — who was not identified in court papers — told the F.B.I. that he had been inappropriately touched by Mr. Hastert when the former speaker was a high school teacher and wrestling coach, the two people said Friday. The people briefed on the investigation spoke on the condition of anonymity because they did not want to be identified discussing a federal investigation.

It was not clear when the suspected behavior, which was first reported by The Los Angeles Times, occurred. Mr. Hastert was a high school teacher and coach in Yorkville, Ill., from 1965 to 1981, and the indictment said the recipient of the payments was from Yorkville and had known Mr. Hastert for decades.