A federal judge on Wednesday approved a $14 million settlement in a landmark class-action lawsuit that accused Walmart of discriminating against its pregnant employees by denying them necessary workplace accommodations.

The case, seven years in the making, marked one of the first pregnancy accommodation cases in the nation to settle as a class action, according to the National Women’s Law Center, one of the organizations representing the pregnant workers.

The settlement, approved by U.S. District Judge Staci M. Yandle of the Southern District of Illinois, will be divided up among 4,000 women who were denied pregnancy accommodations while working at Walmart between March 2013 and March 2014. It will also cover the legal fees and other costs involved in reaching the settlement.

“This sends a clear message to employers across the country about why pregnancy accommodations have to be a focus, and why pregnant workers’ health and safety is a key issue for businesses,” said Emily Martin, a lawyer at the National Women’s Law Center and part of the legal team that represented the workers.

Walmart, which has overhauled its pregnancy accommodation policies, admitted no wrongdoing as part of the settlement.

“We’re happy both sides could come together to reach a resolution,” the retailer said in a statement as part of a joint news release with the organization A Better Balance, which represented the workers along with the National Women’s Law Center and Mehri & Skalet, PLLC. “Walmart has had a strong policy against discrimination in place for many years and we continue to be a great place for women to work and advance.”

Until March 2014, Walmart explicitly excluded pregnant employees from accommodations it offered to employees with disabilities or injuries that prevented them from performing certain jobs. The policy described pregnancy as a medical condition that was not eligible for a reassignment to a lighter-duty job or the transfer of certain tasks to other employees.

The policy meant that Talisa Borders, then an employee at an Illinois Walmart, was not allowed to hand off heavy-duty lifting to other co-workers when she was pregnant in 2013.

Early in her pregnancy, Border had slipped off a ladder during a shift. Worried about the safety of her baby, she asked other co-workers to help with tasks that required lifting heavy objects or climbing a ladder. After a supervisor noticed, and even after Borders brought in a doctor’s note saying she could not lift more than 25 pounds or climb ladders, Walmart forced her to take an unpaid leave of absence, according to the complaint in the case.

Similarly, in 2013, a Walmart supervisor refused to accept a doctor’s note that Otisha Woolbright, an employee at a store in Jacksonville, Fla., should avoid heavy lifting. Woolbright had experienced pain and bleeding early in her pregnancy, and had been told she was at high risk for miscarriage and should avoid strenuous work. Woolbright alleges she was told: “If you can’t do [heavy lifting], you can walk out those doors.”

It was only after Woolbright was injured on the job, while kneeling down and carrying 50-pound trays of rotisserie chickens, that she was given a reprieve, according to the complaint. And after she asked about Walmart’s policies related to parental leave, she was fired.

In January 2014, Borders filed a claim with the U.S. Equal Employment Opportunity Commission, alleging Walmart discriminated against her, in violation of the Pregnancy Discrimination Act. Then, in April, Woolbright also filed a charge of discrimination with the EEOC, alleging that Walmart had discriminated against her because of her sex.

The two women, along with a third plaintiff, Stacey Lewis, of West Virginia, are now members of a class of thousands of women who will each be compensated an average of $2,200, about seven weeks of pay for the average Walmart employee who works less than 40 hours a week.

In Wednesday’s court hearing, held via teleconference, attorney Ellen Eardley said she was proud to return wages to these workers, even if it took seven years.

“It was worth the wait to help others and bring them relief,” Eardley said.

When the women first brought their claims in 2014, workplace pregnancy discrimination was a “lower-profile issue,” said Martin, who is vice president for education and workplace justice at the National Women’s Law Center. But in the years since, numerous states have passed bills expanding protections for pregnant workers. In 2015, the Supreme Court’s landmark decision in Young v. UPS made it easier for pregnant workers to bring claims under the Pregnancy Discrimination Act.

Martin said the case probably will resonate with pregnant workers nationwide, including many who are essential workers in low-wage jobs amid the coronavirus pandemic and are raising questions about how to best protect their health and that of their baby.

She also said she hopes the settlement will help build momentum for a federal law that would establish a pregnant worker’s right to reasonable workplace accommodations. While the Pregnancy Discrimination Act requires an employer to provide pregnant women with the same accommodations as other people limited in their ability to work, it places a heavy burden on pregnant workers to demonstrate that an employer discriminated.

The Pregnant Workers Fairness Act, which has been endorsed by the U.S. Chamber of Commerce, would lift that burden from employees. In past years the bill faced limited bipartisan support, with some lawmakers raising concerns about the burdens on employers.

But, Martin said, “I think that world is quickly changing.”