CHICAGO (AP) — Former Illinois U.S. Representative Aaron Schock has agreed to repay tens of thousands of dollars in taxes and to campaign committees in exchange for prosecutors dismissing his felony corruption case.

Schock appeared Wednesday morning in Chicago federal court where he agreed to repay his three campaign committees nearly $68,000.

He must work with the Internal Revenue Service to determine how much he owes in taxes. If he holds up his part of the deal, prosecutors will drop the original felony counts that were filed against him within six months.

This will leave the ex-congressman with a clean record.

Schock, a once rising star of the Republican party, resigned from Congress in 2015 amid scrutiny of his spending, including redecorating his office in the style of the “Downton Abbey” TV series.

He was indicted in 2016 on 22 counts, including wire fraud and falsification of election commission filings.

Schock told reporters after Wednesday’s court hearing that “there was never an attempt by me or my staff to commit crimes.”

RELATED: Criminal Case Against Former Congressman Aaron Schock Moved To Chicago

The case was originally filed in central Illinois. The Justice Department transferred it to prosecutors in Chicago last year.

Separately, Schock for Congress was charged with failing to maintain records in a matter required to be reported to the Federal Election Commission, a misdemeanor.

The fund pleaded guilty and agreed to pay a fine of $26,553.

Copyright 2019 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.