California’s foster children are too often being warehoused in hotels, office spaces and former juvenile halls rather than receiving intensive services to heal their trauma.

The state is failing the children who need us most because it has failed to invest at every level of the system supporting them. The state budget just adopted offers a thin lifeline to essential programs for youth yet misses crucial opportunities to fix devastating gaps in our system for the most vulnerable young people.

From the viewpoint of the nonprofit programs that help children heal and reunite families, a total collapse is on the horizon without a surge in funding, and better coordination among public and private sectors to meet the growing needs of vulnerable children.

First, helping them starts with prevention. Family resource centers, embedded in communities and with the trust of marginalized groups, keep families together, help them thrive, and save money by helping to avoid child welfare and justice system involvement. For every dollar spent, these centers net a 365% return on investment by keeping children in their homes and out of state systems.

Despite this, the California Alliance of Child and Family Services’ call for $75 million to support this vital work was not taken up by Gov. Gavin Newsom and legislators, missing opportunities to keep children safe at home with their families instead of in the foster care or juvenile justice systems.

Second, California needs foster families. Nearly a decade ago, the state committed to moving children out of group homes and into foster family homes. Yet funding for agencies that recruit, train and support foster families has stagnated, and many are at risk of shutting down. A survey of our member foster family agencies found 44% considered downsizing if they didn’t immediately receive additional funds. Nearly a third said they could close completely.

Newsom did approve the Legislature’s budget with $8 million in bridge funding for California’s network of foster family agencies, a thin but vital lifeline that will help keep the doors open in the short term. Yet without robust, sustained investment, California will never meet its goal to give all foster children the safety of knowing they will sleep in a home each night.

Third, short-term residential therapeutic programs, which care for California’s foster youth with intensive needs, are struggling to survive. California has lost thousands of licensed beds for children with serious mental health conditions over the past several years as nonprofit program operators contend with soaring costs, competition for mental health and other professionals, and restrictive federal regulations.

As demand grows, more young people are at risk of sleeping in inappropriate settings rather than residential programs that combine home-like settings with support and treatment. Despite pleas from these organizations who want to extend vital services to children, another budget year passed without help from the state, leaving children who have sustained trauma, trafficking and other danger in harm’s way.

Everyone involved in the child welfare system wants the same thing: for children and youth to be safe and supported in a family environment whenever possible. But our youth need more than good intentions. The systems serving them must have the resources to keep their doors open, hire highly-trained staff, and spend the time needed to connect children and families with all the support they need to succeed.

Kids involved in the foster care system, disproportionately children of color, are more likely to become involved in the juvenile justice system. They’re more likely to become homeless. They’re at greater risk of exploitation.

The nonprofit agencies that work to help these kids are the glue that holds our child welfare system together. We need legislators and the administration to support these organizations that keep children out of harm’s way.

Christine Stoner-Mertz is CEO of the California Alliance of Child and Family Services.