New Mexico’s efforts reflect a growing awareness nationwide about the need to address the harmful effects of childhood traumas such as poverty, abuse and parental addiction. Research has shown that such traumas can disrupt healthy brain development and can lead to substance abuse, incarceration and health problems later in life. In response, legislators and schools have devoted increasing amounts of funding and resources to “social and emotional” learning that can help children cope with trauma and develop healthy response habits before they reach adulthood.

The need is particularly dire in New Mexico, a largely rural state with a majority-minority population, including 23 tribal nations. The state has the nation’s second-highest rate of childhood poverty, and is ranked last for overall child well-being, according to the Annie E. Casey Foundation, a nonprofit organization in Baltimore. According to the lawsuit, New Mexico also has the highest rate of childhood trauma exposure in the country, with 18 percent of children having experienced three or more significant traumatic events.

Across the country, children entering foster care are likely to have experienced multiple forms of trauma, including physical and sexual abuse, but state foster care systems have often lacked the resources to provide even basic needs.

More than 2,500 children are in foster care in New Mexico, but they have long encountered a “gutted system,” said Ezra Spitzer, the executive director of NMCAN, a nonprofit group in Albuquerque that helps foster youth.

Child advocates said many of the problems stem from policies made years ago, when cooperation efforts with Native American and Pueblo communities largely ceased and Medicaid funding was cut off to 15 behavioral health providers.

“In some places, there was one child psychiatrist or one provider who did everything,” Mr. Spitzer said. “It wasn’t ideal, but then they shut everything down and nothing has filled that void. All of that trickles onto these kids who can’t get appointments or services.”

Two advocacy groups, Disability Rights New Mexico and the Native American Disability Law Center, filed the federal lawsuit against the state’s Children, Youth and Families Department, which operates foster care, and the Human Services Department, which oversees Medicaid services for children in state custody.