Wells Fargo customers who had fake accounts created in their names are a step closer to some payback.

A federal judge granted preliminary approval over the weekend for Wells Fargo's $142 million national class action settlement. The court ruled that the settlement, which covers fake accounts back to 2002, "fair, reasonable and adequate."

Victims may still have to wait before they get paid. The bank and lawyers for the plaintiffs plan to reach out to customers in the next three months, but the settlement may not be final until early 2018.

Still, Wells Fargo CEO Tim Sloan called the court ruling a "major milestone in our efforts to make things right for our customers."

Wells Fargo admitted last September that 2 million potentially unauthorized checking and credit card accounts were opened between 2011 and 2015. The bank blamed unrealistic sales goals. The outrage forced the ouster of longtime CEO John Stumpf and the restructuring of Wells Fargo's sales targets, and it spawned federal and local investigations.

Related: Elizabeth Warren wants the Wells Fargo board wiped out

Under an original settlement with regulators in September, Wells Fargo repaid $3.26 million in fees to wronged customers. Since then, the bank has paid $1.8 million more to cover complaints from customers about fake accounts.

The $142 million national settlement is open to customers who claim that Wells Fargo improperly opened checking or savings accounts, credit cards, lines of credit or identity theft services in their names between 2002 and April 2017.

Wells Fargo has also offered to compensate some customers whose credit scores suffered because credit card accounts were secretly opened in their names.

Derek Loeser, a partner at the law firm Keller Rohrback and lead attorney for the plaintiffs, hailed this feature of the settlement as "groundbreaking" and "first-of-its kind."

The settlement is an important step toward "holding Wells Fargo accountable for its abuse of customers' trust," Loeser said in a statement.

Related: New Wells Fargo scandal over modifying mortgages without consent

The amount that each wronged Wells Fargo customer will receive will vary based on how many fake accounts were opened in their name, how big a financial hit they took and how much money is left in the settlement pool.

The $142 million will first go to lawyer fees and administrative costs. Then Wells Fargo customers will be paid for out-of-pocket losses, such as fees from fake accounts. What's left will be split among all customers, based on how many and what kind of accounts they say were opened.

Wells Fargo has agreed to strengthen the deal: The initial settlement, announced in late March, was worth $110 million. That amount was raised to $142 million in April to expand the settlement to 2002. Wells Fargo's board recently released a report that found evidence of fake accounts going back to "at least" that year.

Wells Fargo has agreed to put more money in the settlement fund if less than $25 million is left for wronged customers after paying the lawyers, expenses and out-of-pocket costs.

Customers who believe they were victims don't need to take action yet to be included. More information is available at www.wfsettlement.com, and Wells Fargo has established a hotline at 1-877-924-8697.

A hearing for the court to grant final approval is scheduled for January 4.