The Canadian government has agreed to pay more than $30 billion to compensate indigenous children that were taken from their families and placed in the child welfare system. The money is also intended to be used to improve the child and family services on reserves of Indigenous First Nations.

The agreement will resolve legal challenges going back to a decade that allege Canada has underfunded child services in First Nation Communities. The concerns were brought before Canada’s Human Rights Tribunal by First Nations Child & Family Caring Society.

Canada’s inadequate support for child welfare programs in First Nation communities led to government agencies sending children to areas with more resources. First Nation children are 17 times more likely to end up in foster care.

The settlement funds will go to compensating tens or even hundreds of thousands of children who were either removed from their families or unable to access needed support. It will also go to improving services for ingenious children and their families where they live.

Marc Miller, Canadas Indigenous Relations Minister, called the settlement the largest in Canada history.

“The agreements in principle we have signed today will support First Nation children so they can have the same opportunity’s to grow up with their families and communities thriving through their culture,” said Miller.

Details of how the money will get distributed still need to be worked out.

“Public pressure and litigation and all of us paying attention has made a world of difference, but these are simply words on paper,” said Cindy Blackstock, executive director of First Nations Child & Family Caring Society.