After a nearly eight-year legal battle, Lance Armstrong agreed Thursday on a settlement in the high-profile “whistleblower” lawsuit brought against the seven-time Tour de France champion by the federal government. According to the New York Times, Armstrong agreed to pay $5 million, of which $1.1 million will go to former teammate Floyd Landis, who brought the case to the government in 2010 and was the original plaintiff.

The suit was being pursued under the False Claims Act, which allows the government to recover money lost as a result of fraud. The feds’ case hinged on the idea that, by lying about his doping as a professional cyclist, Armstrong had damaged the U.S. Postal Service, which had invested $32.3 million to sponsor his cycling team from 1999-2005.

As S.C. Gwynne reported in Outside last October, Armstrong faced the prospect of financial ruin if he lost in court. After repeated delays, the case was scheduled to begin on May 7, and the government was seeking $97 million—three times the damages—the maximum allowable penalty under the False Claims Act. Though Armstrong’s one-time net worth has been reported to hover at around $100 million, by last fall, legal wrangling in the whistleblower case had already burned through $15 million of the fortune he amassed through cycling. And prior to Thursday's settlement, he’d spent another $21 million to settle a handful of additional lawsuits related to his admission to doping.

In addition to the $5 million, Armstrong has also agreed to pay Landis’s $1.65 million in legal fees.

All told, it’s a big fine, but nowhere near the penalty Armstrong once faced. “I am glad to resolve this case and move forward with my life,” Armstrong said in a statement released by his law firm. “There is a lot to look forward to.”