Washington (CNN) Federal officials have indicted former House Speaker Dennis Hastert for lying to the FBI about $3.5 million he agreed to pay to an undisclosed subject to "cover up past misconduct."

The indictment was unsealed in the District Court of Northern Illinois on Thursday. The Justice Department alleges that Hastert made large withdrawals after agreeing to pay the money.

The indictment does not explain precisely what the "past misconduct" is, but instead details at length various withdrawals and financial transactions he made with the unidentified subject. The payments totaling about $1.7 million occurred over a period of years beginning in 2010 and ending in 2014.

"During the 2010 meetings and subsequent discussions, Hastert agreed to provide Individual A $3.5 million in order to compensate for and conceal his prior misconduct against Individual A," according to the indictment.

Hastert, 73, served as House speaker from 1999 until 2007, when Democrats retook the House. Before serving in Congress, he was a high school teacher and coach in Yorkville, Illinois.

Photos: Politicians in hot water U.S. Rep. Chaka Fattah was convicted on federal corruption charges on Tuesday, June 21. The Philadelphia Democrat was tied to a host of campaign finance schemes, according to the Department of Justice. Hide Caption 1 of 12 Photos: Politicians in hot water Former Speaker of the House Dennis Hastert was sentenced to 15 months in prison and ordered to pay $250,000 to a victims' fund in April after a hush-money case revealed he was being accused of sexually abusing young boys as a teacher in Illinois. Hide Caption 2 of 12 Photos: Politicians in hot water Former Virginia Gov. Bob McDonnell arrives at his corruption trial in Richmond, Virginia, in September 2015. A jury convicted McDonnell and his wife, Maureen, derailing the political ambitions of the one-time rising star in the Republican Party. McDonnell, who was sentenced to two years in prison, has asked the Supreme Court to reverse his conviction. The high court heard his challenge in April. Hide Caption 3 of 12 Photos: Politicians in hot water U.S. Sen. Robert Menendez, a New Jersey Democrat, was indicted on corruption charges in April 2015. Federal prosecutors have accused Menendez of using his Senate office to push the business interests of a friend and donor in exchange for gifts. The senator has pleaded not guilty to the charges and vehemently asserts his innocence. Hide Caption 4 of 12 Photos: Politicians in hot water U.S. Rep. Vance McAllister asked for forgiveness from God, his family and his constituents after a newspaper published what it said was surveillance video showing the married Louisiana Republican making out with a female staffer. His term ended in 2015. Hide Caption 5 of 12 Photos: Politicians in hot water Former U.S. Rep. Jesse Jackson Jr. and his wife, Sandra, arrive at federal court in Washington for sentencing in August 2013. Jackson, a Democrat from Illinois, was sentenced to 30 months in prison for improper use of campaign funds, while his wife got 12 months for filing false tax returns. Hide Caption 6 of 12 Photos: Politicians in hot water In 2012, former Illinois Gov. Rod Blagojevich was sentenced to 14 years in prison after being convicted of 18 criminal counts, including trying to sell the appointment to fill the U.S. Senate seat vacated by Barack Obama. Hide Caption 7 of 12 Photos: Politicians in hot water Lewis "Scooter" Libby, former chief of staff for Vice President Dick Cheney, was convicted in 2007 of obstructing a federal investigation into who revealed the identity of CIA agent Valerie Plame Wilson. He was sentenced to 30 months in prison and fined $250,000, but former President George W. Bush commuted his sentence. Hide Caption 8 of 12 Photos: Politicians in hot water Former U.S. Rep. William Jefferson was sentenced to 13 years in prison in 2009 after being convicted of 11 counts of corruption related to using his office to solicit bribes. The Louisiana Democrat was also ordered to forfeit $470,000. Hide Caption 9 of 12 Photos: Politicians in hot water Former U.S. Rep. Bob Ney, a Republican from Ohio, was sentenced to 30 months in prison in 2007 after being convicted of conspiracy to commit fraud and making false statements to investigators. Hide Caption 10 of 12 Photos: Politicians in hot water U.S. Rep. James Traficant Jr., D-Ohio, spent seven years in prison after being convicted of bribery and corruption and tax evasion charges in 2002. Hide Caption 11 of 12 Photos: Politicians in hot water Former U.S. Rep. Randy "Duke" Cunningham, R-California, was sentenced to eight years in prison in 2006 after he was convicted of collecting $2.4 million in homes, yachts, antique furnishings and other bribes on a scale unparalleled in the history of Congress. Hide Caption 12 of 12

The news of his indictment shocked some of his former colleagues. Speaking on CNN's "New Day" on Friday, Sen. Ben Cardin, recalled that he was elected to the House at the same time as Hastert.

"I think we're all surprised by this," the Maryland Democrat said.

Former Virginia Republican Rep. Tom Davis, who served in Congress from 1995 to 2008 with Hastert, said Friday he was stunned by the revelations and said Hastert had been elevated to his post precisely "because he was above reproach."

"In my knowledge, he was a remarkably ethical leader ... that's why he was put there," Davis said.

And former Pennsylvania Sen. Rick Santorum, who also served in the House with Hastert, said shortly after Cardin on CNN that the news "doesn't make any sense to me," and said it "seems very much out of character" for the former Speaker. But he also called the revelations "disturbing."

"I'm very disappointed, obviously, in what I've heard and want to find out more about it," he said. "To see this kind of revelation is really upsetting. I feel bad for everyone involved."

Hastert presided over a series of scandals during his time as speaker, including the resignation of former U.S. Rep. Mark Foley in 2006, and ascended to the speakership over former Rep. Bob Livingston in 1999, who was the subject of a scandal.

A woman who answered the phone at Hastert's office on Thursday said the speaker was unavailable and took a message.

According to the indictment, Hastert made multiple withdrawals under $10,000 -- to avoid triggering federal bank reporting requirements -- to then pay the subject.

Photos: Dennis Hastert's political career Dennis Hastert in 1985 as a member of the Illinois House of Representatives, where he served from 1980 to 1986. Hide Caption 1 of 8 Photos: Dennis Hastert's political career Hastert is sworn in as speaker of the House of Representatives on January 6, 1999, during the opening session of the House in Washington. Hastert replaced Newt Gingrich. Hide Caption 2 of 8 Photos: Dennis Hastert's political career Hastert stands behind President George W. Bush as he signs Medicare legislation in December 2003. Hastert fought hard for the bill in the House, leading to a three-hour vote on November 22, 2003. Hide Caption 3 of 8 Photos: Dennis Hastert's political career House Rules Chairman David Dreier and Hastert hold a news conference on a GOP lobbying reform package, which included banning privately funded travel and eliminating access to the House floor for former members who are registered lobbyists. On January 3, 2006, Hastert donated $70,000 of campaign contributions from companies associated with lobbyist Jack Abramoff to charity after Abramoff pleaded guilty to corruption charges. Hide Caption 4 of 8 Photos: Dennis Hastert's political career Vice President Dick Cheney greets Hastert before Latvian President Vaira Vike-Freiberga speaks to a joint meeting of Congress in June 2006. Earlier that month, Hastert had surpassed Joe Cannon to become the longest-serving Republican speaker of the House. Hide Caption 5 of 8 Photos: Dennis Hastert's political career Hastert celebrates his re-election to an 11th term in Congress on November 7, 2006, with his wife, Jean, at a victory party in the Baker Hotel in St. Charles, Illinois. Republicans lost their majority in the House, meaning Hastert lost his position as speaker when the new Congress started on January 4, 2007. Hide Caption 6 of 8 Photos: Dennis Hastert's political career Hastert announces that he will not seek re-election for a 12th term on August 17, 2007, as he stands on the steps of the old Kendall County courthouse in Yorkville, Illinois. Hide Caption 7 of 8 Photos: Dennis Hastert's political career Hastert walks through Statuary Hall on his way to the House floor to make his farewell address to Congress on November 15, 2007. He formally resigned on November 26, 2007, after 20 years in office. Hide Caption 8 of 8

When he was asked by federal investigators about the withdrawals, he said it was so he could keep the money himself. When confronted by federal investigators, Hastert insisted, "Yeah ... I kept the cash. That's what I'm doing."

Hastert served in the Illinois House of Representatives until 1986, when he was elected to Illinois' 14th congressional district. In 1999, he was elected speaker of the House and became the longest-serving Republican speaker of the House.

In 2008 he joined the Washington lobbying firm Dickstein Shapiro as a senior adviser.

Dickstein Shapiro had Hastert listed as a senior adviser and "co-leader of the firm's Public Policy & Political Law Practice" on their website, but after a CNN inquiry about his employment his profile was removed minutes later. A spokesperson for the law firm confirmed to CNN that Hastert resigned from the firm.

The indictment offers little information on the subject "Individual A", other than noting that the two knew each other from before Hastert's career in politics.

Former House Speaker Newt Gingrich declined to comment on the charges against Hastert when asked by CNN at the Champions of Jewish Values awards gala in New York City.