WASHINGTON (Reuters) – A U.S. budget deal adopted by Congress on Friday includes what advocates call a landmark compromise to provide an estimated $1.5 billion over 10 years to try to keep struggling families together, including those with babies born dependent on opioids.

The provision allows assistance on mental health, substance abuse and parenting whenever any child is deemed at imminent risk of entering foster care. It also offers support for relatives who unexpectedly assume responsibility for a child when a parent cannot.

The funding is part of a bipartisan budget deal passed by lawmakers which alleviates spending fights that marked President Donald Trump’s first year in office, but sets the stage for a battle over immigration and exploding deficits ahead of November’s congressional elections.

The measure is intended to help newborns whose mothers were addicted to opioids, including heroin, during pregnancy.

More than 110 babies died between 2010 and 2015 after being born opioid-dependent and sent home with parents ill-equipped to care for them, a 2015 Reuters investigation found.

Senator Ron Wyden of Oregon, the top Democrat on the Finance Committee, said the funding “will usher in the most significant improvements to the child welfare system in decades and provide real help to families to fight the opioid epidemic.”

The change opens up a new stream of money from a Social Security program now limited to foster care. It allows an estimated $1.5 billion over 10 years to be used to prevent children from entering foster care.

LITTLE NOTICED

The action this year was part of a broad congressional budget agreement that includes about $6 billion for opioid and mental health issues. Though little noticed in the larger debates over defense and domestic spending, the section of law called the Family First Prevention Services Act fills more than 100 pages of the 652-page budget compromise.

Senator Orrin Hatch of Utah, Republican chairman of the Finance Committee, who co-sponsored that part of the legislation with Wyden, said on the Senate floor on Thursday that it would “help keep more children safely with their families.”

At a Senate committee hearing on Thursday, William Bell, president of Casey Family Programs, said that for every $7 spent on foster care there is only $1 spent on intervention. He said states need the ability to target their existing resources into early intervention services.

Stephen Patrick, a Vanderbilt University neonatologist and opioids expert, testified that a sevenfold increase from 2000 to 2014 in the number of babies born with drug-withdrawal syndrome had flooded the healthcare and child welfare systems.

He said there is also an urgent need to expand addiction treatment for pregnant women.

The budget agreement describes helping children by funding “mental health and substance abuse prevention and treatment services or in-home parent skill-based programs.” It also provides funding for families struggling with addiction who stay together in family treatment facilities.

About 49,000 babies in 2016 were placed in out-of-home care who could have been helped by preventive services authorized in the new law, according to Children and Family Futures, a nonprofit organization that advises federal and state agencies.

After the 2015 Reuters reports, Congress updated a law requiring safety plans for the babies and more help for the parents but did not add funding.

A report earlier this week by the U.S. Government Accountability Office, a congressional watchdog, said states are still confused about what hospitals and social services should do with drug-dependent newborns and other substance-affected infants.

“This bill makes sure that children are protected and families are not split up unnecessarily,” said U.S. Representative Vern Buchanan, a Florida Republican. “Our current system creates a perverse incentive to place children in foster care. Breaking up families should be a last resort.”