Walmart has agreed to settle a lawsuit claiming that the retail giant illegally denied health insurance benefits to the spouses of its employees who are gay.

Plaintiff Jacqueline Cote was represented by the LGBT law group GLAD, which said Friday that Walmart had agreed to pay $7.5 million to cover the health-related expenses of more than 1,000 current and former Walmart employees who were denied coverage.

Cote, who started working at the company's Swansea, Massachusetts store in 1999, married her wife Diana “Dee” Smithson in 2004. When Cote applied for health insurance benefits for Smithson, Walmart refused, saying that it did not provide such benefits to the spouses of gay employees.

Walmart reversed its policy in January 2014 and now provides equal health benefits to all employees regardless of sexual orientation.

Cote's lawyers argued that denying such benefits to gay employees violated Title VII of the U.S. Civil Rights Act of 1964.

Cote, who left Walmart earlier this year, said that the couple struggled to pay for a separate health insurance policy. A short time after Smithson's policy was canceled in 2012, she was diagnosed with ovarian cancer, which resulted in thousands of dollars in medical bills.

“I'm pleased that Walmart was willing to resolve this issue for me and other associates who are married to someone of the same sex. It's a relief to bring this chapter of my life to a close,” Cote said in a statement.