Former GOP attorney general candidate Doug Wardlow faces a fine of more than $46,000 after exceeding the state’s spending limit in the heated race against Attorney General Keith Ellison.

Wardlow’s expenses in the race were supposed to top out at $864,072. However, the Republican candidate’s campaign committee ended up spending $910,490 over two years, according to a Campaign Finance and Public Disclosure Board document.

Campaign staff realized that they were going to be over the limit in the final week of the race, after some confusion about what counted as an expenditure, said Billy Grant, Wardlow’s former campaign manager. The board document notes there were thousands of dollars of expenses that had to be reclassified after an official review.

“We’re really proud of the campaign we ran. We raised a record amount of money for a Republican candidate running for attorney general. And during the course of the campaign things got very hectic and we realized late in the game we were going to go over, and we’re committed to paying back the funds,” Grant said.

A conciliation agreement signed by Wardlow and Campaign Finance and Public Disclosure Board Chairwoman Margaret Leppik on Tuesday states that he must pay back $10,000 within 30 days. The board will create a payment plan for him to refund the rest of the money after that.

Wardlow, who previously worked as an attorney for a conservative Christian nonprofit, lost to Ellison after a heated race in which both candidates’ pasts were intensely scrutinized. He was not immediately available to comment Tuesday.