Meta has agreed to pay up to $16.68 billion to settle a lawsuit brought by 29 U.S. states alleging Facebook and Instagram were deliberately designed to addict children and unlawfully collected data from minors. The deal was reached in the second week of a federal trial in Oakland, California, before Judge Yvonne Gonzalez Rogers, averting one of the highest-profile tests yet of claims that social platforms harm young users.

Under the consent judgment, Meta must impose a two-hour daily combined usage limit on Facebook and Instagram for teens, a night mode blocking access from midnight to 6 a.m., a school-hours notification mute, stronger age-verification systems, and expanded parental controls. States will receive about 70% of the settlement, roughly $12.7 billion, over ten years; the remaining $5.3 billion is conditional on YouTube and TikTok adopting comparable safeguards.

Meta denied any wrongdoing despite agreeing to the terms, and shares rose over 4% in pre-market trading. The company still faces thousands of other pending lawsuits over its impact on young users, including cases it lost in Los Angeles and New Mexico that it plans to appeal.