(Reuters) - Walmart Inc has agreed to pay $65 million to nearly 100,000 current and former cashiers in California who accused the retailer of violating state law by refusing to provide them with seating while they worked.

The logo of Down Jones Industrial Average stock market index listed company Walmart is shown on one of its stores in Encinitas, California April 13, 2016. REUTERS/Mike Blake

Walmart denied any wrongdoing in the nine-year-old case, which was scheduled to go to trial later this year, in a filing in federal court in San Francisco on Wednesday. The settlement must be approved by a federal judge.

In addition to the payout, the company said it would begin providing seating to its cashiers in California.

Walmart spokesman Randy Hargrove said “both sides are pleased to have reached a proposed resolution.”

Lawyers for the plaintiffs did not immediately respond to a request for comment.

In the court filing, Walmart and the plaintiffs’ lawyers said the settlement, if approved, would be the largest ever under California’s unique Private Attorney General Act. The law allows workers to sue their employers on behalf of the state and keep one-quarter of any money that they win.

The lawsuit was one of the first brought under a California regulation that requires seating for employees “when the nature of the work reasonably permits.”

The regulation was originally adopted in 1911 to apply only to women working in the retail industry, and was tweaked and expanded several times in the ensuing century.

Walmart had claimed that placing stools at cash registers would pose a safety hazard and could make workers less productive. The company said the nature of cashiers’ work did not reasonably permit seating because they need to scan large items, stretch to see the bottom of shoppers’ carts, bag merchandise, and sometimes perform work away from registers.

Walmart had also said it had a policy of offering stools to cashiers with medical conditions or disabilities, and store managers have the discretion to provide stools to cashiers on a case-by-case basis.

Bank of America last year paid $15 million to settle a lawsuit by tellers over seating. CVS Health Corp, JPMorgan Chase Bank NA JPM_pd.N, Kmart, AT&T Corp and Home Depot Inc have also faced similar lawsuits.

The case is Brown v. Walmart Inc, U.S. District Court for the Northern District of California, No. 5:09-cv-03339.