Apple settled for $490 million to resolve a class-action lawsuit Friday, which accused CEO Tim Cook of misleading shareholders in 2019 by failing to disclose low demand for Apple products in China.

Plaintiffs allege that Cook withheld this knowledge of falling demand, causing shareholder wealth to fall by billions when Apple later forecasted a steep drop in profits in 2019. This drop was almost entirely due to low demand in China, says The Associated Press.

Apple has denied claims of withholding information but settled to avoid the costs and distraction of litigation. In settlement documents, the company said it wished to avoid an “overly burdensome, expensive, and distracting” legal ordeal.

The preliminary settlement was filed Friday with the U.S. District Court in Oakland, California, but still needs to be approved by U.S. District Judge Yvonne Gonzalez Rogers, who last year refused to dismiss the lawsuit.

The lawsuit stems from an investor meeting in 2018, when Cook expressed confidence in how Apple is performing in China, saying it was “very strong last quarter.” He added that although Apple has struggled with iPhone sales in Brazil, Russia, India and Turkey, he “would not put China in that category.”

A few days after the call, Apple told suppliers to slow down production.

Then, in January 2019, Apple made a revenue forecast that shocked many shareholders, saying that profits would drop by about $9 billion. The drop was blamed on trade tensions between the U.S. and China.

The forecasted revenue drop cut Apple shares by 10%, ultimately taking out $74 billion of the company’s market value.

According to The Wall Street Journal, plaintiffs said Apple knew that it wasn’t performing well in China and should have disclosed that information to shareholders earlier. They said, “Apple’s business metrics and financial prospects were not as strong as defendants had led the market to believe.”

The leading plaintiff in the case is Norfolk County Council in the U.K., which is the administering authority of the Norfolk Pension Fund.

Rogers said she found it plausible that Cook had been discussing the company’s sales outlook, not currency matters. She added that Cook knew that China’s economy was slowing down and the demand for iPhones could fall.

Apple has denied these claims.

According to Shawn Williams, a lawyer for the Apple shareholders, the settlement was an “outstanding result” for the class involved in the lawsuit.

The shareholders’ lawyers may seek fees up to 25% of the settlement amount.

Since January 2019, Apple’s share price has grown more than four times, putting its market value at $2.6 trillion.

The settlement payout will amount to less than two days’ worth of profit for the company, which in its latest fiscal year, made approximately $97 billion in net income.

Some information for this report came from Reuters and The Associated Press.