The federal government has reached an agreement to settle a long-standing dispute over the First Nations child welfare system, CTV News confirmed Saturday.

Ottawa and child welfare advocates reached an agreement on compensation the Canadian Human Rights Tribunal (CHRT) has ordered the federal government to pay First Nations children and their parents or grandparents.

Further details of the agreement will be announced Tuesday.

The legal saga began in 2007 when the First Nations Child and Family Caring Society filed a complaint with the CHRT alleging the child welfare system was flawed and discriminated against First Nations children.

The CHRT ruled in 2016 that the federal government had underfunded the child welfare systems on reserves. The federal government was ordered to pay up to $40,000 to each First Nations child unnecessarily put in foster care.

The government and Indigenous groups have been negotiating since November after the federal government filed a notice of appeal on the compensation order. The two sides originally set a deadline of the end of 2021 to reach a deal.

The decision to appeal was panned by some Indigenous leaders at the time, who called the move unproductive toward the goal of reconciliation.

On Dec. 13, the government announced it would set aside $40 billion to both compensate First Nations members harmed by the child welfare system and also reform the current system in place.

The Assembly of First Nations estimates about 54,000 children and their families may qualify for compensation.

With files from CTV News's Caroline O'Neil, Brooklyn Neustaeter and Creeson Agecoutay, and The Canadian Press