Cracker Barrel has agreed to pay $8.7 million to settle lawsuits that accused the restaurant chain of segregating black customers, subjecting them to racial slurs and giving black workers inferior jobs.

"This matter has been resolved to everyone's satisfaction and the parties are now ready to move forward," Donald M. Turner, the chain's president and chief operating officer, said Thursday. "Cracker Barrel is very pleased with this settlement."

David Sanford, a lawyer for the plaintiffs, said the settlement "represents good closure to a bad period."

At least 42 plaintiffs, including the National Association for the Advancement of Colored People, were represented in the customer lawsuits that claimed in 2002 that the company, based in Lebanon, Tenn., denied service to black customers and seated them in designated parts of the restaurant, such as smoking sections. Plaintiffs in 16 states also alleged they were subjected to racial slurs and served food taken from the trash, while Cracker Barrel management ignored or condoned such actions.

There was no explicit acknowledgment of wrongdoing in the one-paragraph announcement of the settlement that was agreed upon by the company and the plaintiffs.

Julie Davis, a Cracker Barrel spokeswoman, disputed one of the most serious accusations -- that blacks were served food taken from the trash -- saying plaintiffs' attorneys could not produce a witness to back up that allegation.

Another set of lawsuits covered by the settlement was filed in 1999 by about a dozen black employees, who alleged they were segregated from white workers and generally received "back of the house" jobs such as cook and dishwasher.

The company's fourth-quarter earnings report included a $3.3 million (7 cents per share) charge for costs associated with the settlements.

On Thursday, shares of the restaurant chain's parent company, CBRL Group Inc., rose $2.61, or 8 percent, to close at $35.08 on the Nasdaq Stock Market.

The settlement comes four months after the company settled a Justice Department lawsuit accusing Cracker Barrel of similar discrimination claims at dozens of restaurants, mainly in the South.

Federal investigators found that black customers at many of the restaurants were seated in areas segregated from white patrons, frequently received inferior service and often were made to wait longer for tables. Blacks who complained about poor service also were treated less favorably than whites, the Justice Department said.

At the time, Cracker Barrel agreed to a number of operational changes but did not acknowledge any wrongdoing and paid no fines or penalties.

"The very moral thrust of the lawsuit was to have Cracker Barrel change its policies," said Sanford, who represented the original 42 plaintiffs. "The Justice Department was able to do that.

"The settlement now, with respect to the plaintiffs, has to do with a [monetary] settlement."

Cracker Barrel operates 505 restaurants, offering "country cooking," in 41 states.

In its earnings report, the company said net income for the quarter ended July 30 was $29.9 million (60 cents per share), down from $35.5 million (70 cents) a year ago. Without the special charge for the lawsuit settlement, the earnings were a penny above the 66 cents per share forecast by analysts surveyed by Thomson First Call.

For the year, Cracker Barrel's profit was $113.3 million ($2.25), up from $106.6 million ($2.09) last year.