MINNEAPOLIS — Thousands of Comcast/Xfinity customers in Minnesota will receive refunds and debt relief as the company settles a lawsuit that alleged it overcharged consumers for cable TV packages, the state attorney general announced Wednesday.

Minnesota Attorney General Keith Ellison said 15,600 Minnesotans will receive refunds and an additional 16,000 will get debt relief. Together, the refunds and debt relief are worth millions of dollars, Ellison said.

The settlement also requires Comcast to change its advertising practices to disclose the full amount customers will be charged for service.

"This settlement will help put money back in Comcast's customers' pockets where it should have been in the first place. Just as importantly, it provides millions of dollars' worth of debt relief," Ellison said in a statement. "And we've made sure that going forward, Comcast customers will know exactly how much they'll pay for service before they sign up for it. That should put an end to unpleasant surprises."

Comcast spokeswoman Jill Hornbacher said the settlement "reflects our ongoing efforts to improve the customer experience.

"While we disagree with the allegations initially made in the lawsuit — which do not reflect our policies and practices — we agreed to settle because we are committed to partnering with Attorney General Ellison and others who share our commitment to improving the experience of our customers in all respects. We believe this settlement agreement furthers that shared goal," Hornbacher said.

The lawsuit filed in 2018 alleged the company engaged in consumer fraud and deceptive trade practices. It accused Comcast of overcharging customers for cable, charging for equipment and services that customers hadn't ordered, and failing to deliver on promised Visa gift cards. Then-Attorney General Lori Swanson said Comcast often promised customers fixed prices for a year or two for cable packages, then tacked on undisclosed fees that could jack up the bill by 30% or more.

Under terms of the settlement, Comcast is required to pay $1.14 million in refunds and will send a claim form to all eligible customers. Comcast will also wipe out debt for about 16,000 former customers who were charged an early termination fee after they downgraded or canceled services while in a contract. The debt relief is expected to be worth millions of dollars to those affected.

The announcement comes a week after Ellison announced a settlement in a lawsuit against CenturyLink.