Wonder Bread owner Flowers Foods said in a Friday filing that it reached a settlement for a class action lawsuit originally filed in March 2013.
The stock rocketed 17 percent higher after the news. It later pared those gains, but was still ended the day 13 percent higher.
The company said the amount includes $5.2 million in settlement funds and $3.8 million in attorney fees.
The lawsuit focused on whether or not Flowers Foods had misclassified its distributors as independent contractors instead of employees. The original complaint, filed in North Carolina, alleged "violations of the Federal Fair Labor Standards Act."
The key to Friday's settlement was that the company's current independent distributor model will remain in place. As part of that model, Flowers sells defined territories to its distributors who gain exclusive rights.
"Certain non-economic terms that are intended to strengthen and enhance the independent contractor model" were also part of the deal, Flowers Foods said in its Friday filing.
Shares of Flowers Foods have fallen by more than 10 percent so far in 2016.
Correction: This article was corrected to clarify that the lawsuit was related to the classification of independent distributors. An earlier version of this article misstated the nature of the case.