Wal-Mart Stores Inc on Friday said it would pay $7.5 million to settle a U.S. lawsuit claiming it discriminated against gay employees nationwide by denying health benefits to their spouses.

Walmart store in Carson, California, on January 27, 2015. Moment Editorial/Getty Images

Wal-Mart and lawyers for Jacqueline Cote, the worker who filed the 2015 lawsuit in federal court in Boston, said in a court filing that the money may be split among more than 1,000 people who were denied spousal benefits between 2011 and 2014, when Wal-Mart changed its policy.

The settlement must be approved by a federal judge.

Sally Welborn, a senior vice president at Bentonville, Arkansas-based Wal-Mart, said in a statement that diversity and inclusion were among the company's core values.

"We will continue to not distinguish between same and opposite sex spouses when it comes to the benefits we offer under our health insurance plan," she said.

Wal-Mart, the largest private U.S. employer, began offering health insurance benefits to same-sex spouses in 2014, a year after the U.S. Supreme Court struck down a provision of the federal Defense of Marriage Act that denied benefits to married gay couples.

Cote, who has worked at Wal-Mart stores in Maine and Massachusetts since 1999, said in the lawsuit that her wife, Diana Smithson, developed cancer in 2012 and Wal-Mart's denial of insurance coverage led to more than $150,000 in medical debt. Smithson died in March.

Cote in a statement on Friday said she was pleased with the settlement.

"It's a relief to bring this chapter of my life to a close," she said.

Federal employment discrimination laws do not explicitly provide protections for gay workers. But LGBTQ groups and the Obama administration have aggressively pushed the argument that bias against gay people is a form of sex discrimination, and three federal appeals courts are currently considering that claim.

The case is Jacqueline Cote v. Wal-Mart Stores Inc, U.S. District Court for the District of Massachusetts, No. 15-cv-12945.

Follow NBC OUT on Twitter, Facebook and Instagram.