The NFL and the NFL Players Association have finalized an agreement on a six-game suspension for Denver Broncos linebacker Von Miller for violating the league's substance-abuse policy.

Miller was nearly suspended for a full season by the NFL and then for eight games, a source told FOX Sports, but the sides negotiated a settlement in recent days.

"The Substances of Abuse policy requires everyone to comply with the rules. Although my suspension doesn't result from a positive test, there is no excuse for my violations of the rules," Miller said in a statement released through the NFLPA. "I made mistakes and my suspension has hurt my team, Broncos fans, and myself. I am especially sorry for the effect of my bad decisions on others. I will not make the same mistakes about adhering to the policy in the future. During my time off the field, I will work tirelessly and focus exclusively on remaining in peak shape.

"I look forward to contributing immediately upon my return to the field and bringing a championship back to the people of Denver."

Miller will lose more than $800,000 in base salary by sitting out six games and is subject to forfeiting more than $1.2 million of his signing bonus. So in all, the suspension could cost him more than $2 million. The Broncos must ask for a return on the prorated portion of the bonus. It's the third year of Miller's contract, which means he's eligible for a contract extension after the season.

Miller was initially suspended for four games, which is the standard length for a first suspension under the NFL's substance-abuse policy. But during the appeal process, information on further violations was revealed and could have resulted in a suspension of up to one season, a source told FOX Sports.

Based on that information, it can be surmised that the NFL viewed Miller as having compromised his test. (The initial four-game suspension was for a diluted sample, the source confirmed.) Under the NFL's drug policy, a compromised test allows NFL commissioner Roger Goodell to step in and levy stricter penalties.

ESPN reported Monday that Miller spilled the urine on his first test, then later provided a second sample. The second sample was the one determined to be diluted, the source said.

Representatives for Miller, which included NFL Players Association lawyers and outside counsel, claimed during negotiations the NFL breached confidentiality by providing Miller's full drug-testing history to the Broncos, per the source. Miller's representatives used that information as leverage in the negotiations.

In the end, Miller didn't get his suspension backed all the way down to the initial four-game ban but did receive only two games more instead of 12 more.