SAN LORENZO, CA - FEBRUARY 20: A Wal-Mart truck sits outside of a Wal-Mart store on February 20, 2014 in San Lorenzo, California. Wal-Mart reporterd a 21 percent decline in fourth quarter earnings with profits of $4.4 billion or $1.36 a share compared to $5.6 billion, or $1.67 per share one year ago. (Photo by Justin Sullivan/Getty Images)

A Walmart contractor that operates many of the retailer's distribution centers has agreed to pay $21 million in backpay to warehouse workers in California who claim they were systematically shorted on pay for years.

If approved by a judge, the preliminary settlement will resolve a lawsuit originally filed in 2011 by six workers employed by Schneider Logistics in the Inland Empire area of Southern California. The workers claim that they were forced to work on piece rate in dangerously hot conditions moving Walmart goods, and that when they complained about the working conditions they were threatened with their jobs.

"This settlement vindicates us," David Acosta, one of the plaintiffs, said in a statement. “When we raised these issues, we knew it would be a fight. Schneider tried to fire us. Walmart tried to deny responsibility. But we knew that the law was on our side."

"We're thrilled," Lauren Teukolsky, one of lawyers for the plaintiffs, told HuffPost. "The workers are going to be receiving the wages that were stolen from them."

Despite the large sum, the settlement won't be coming out of Walmart's pockets.

The plaintiffs had successfully petitioned to have Walmart named as a defendant in the case. This was a victory for workers who argued that the world's largest retailer sets the working conditions in the warehouses, even if it's Walmart's contractors who actually employ the workers. But under the terms of the settlement, the full amount of the penalty falls to Schneider, the contractor. Walmart will pay nothing.

"We're obviously pleased with the proposed settlement agreement," said Kory Lundberg, a Walmart spokesman. "Schneider is the one that's solely responsible for paying the agreed upon amount."

According to Teukolsky, Walmart had "vigorously opposed" being added as a defendant, though the judge ultimately found it could be held liable as a joint employer. Teukolsky said that the case "makes clear that employers like Schneider and Walmart that exercise control over low-level workers may be liable for wage theft on their watch," even if they don't employ the workers themselves.

Having battled Walmart for years over the company's pay practices, labor groups have recently taken their fight with the retailer to its sprawling supply chain, where contracted workers load and unload goods destined for Walmart stores. As HuffPost reported in 2011, many of the so-called warehouse "lumpers" are temp workers toiling for low pay and no benefits at dizzying production rates.

While Walmart directly manages much of its distribution network, the company hands off a lot of the operations to third-party logistics firms like Schneider, which, in turn, often contract with temp staffing firms. Workers have filed a raft of wage-theft lawsuits against Walmart sub-contractors, but the California suit was the first in which a judge allowed Walmart itself to be included.

"Walmart's name does not appear on any of these workers' paychecks, and the Walmart logo does not appear on the t-shirts they're required to wear," Michael Rubin, one of the workers' lawyers, said when the plaintiffs petitioned the court to include Walmart. "But it has become increasingly clear that the ultimate liability for these workplace violations rests squarely on the shoulders of Walmart."

In December, a federal judge approved a settlement in a separate lawsuit filed against Schneider by warehouse workers moving Walmart product. In that case, the company agreed to pay out $4.7 million to 568 workers. The workers claimed the company failed to pay them overtime and made illegal deductions from their paychecks. None of those workers were directly employed by Walmart, either.