Florida health officials have reached a settlement ending a decadeslong class-action lawsuit that alleged the state is violating federal mandates by failing to deliver critical health services to 2 million children on Medicaid.

The settlement comes after a 2005 lawsuit against three state agencies alleging 390,000 children did not get a medical checkup in 2007 and more than 750,000 received no dental care. Judge Adalberto Jordan sided with the plaintiffs in 2014 and sent both parties to meditation. An agreement was finalized in the last few days.