The Trump administration dropped its appeal of a federal judge’s order Friday and agreed to provide mental health care to thousands of immigrant parents and children who were separated at the Mexican border by the administration’s “zero tolerance” policy.

U.S. District Judge John Kronstadt of Los Angeles issued the injunction in November requiring the government to promptly provide mental health screenings for the parents and their families, and treatment for those who needed it. He said there was evidence that the family separations caused “severe mental trauma to parents and their children” and that administration officials had been “deliberately indifferent to the mental health risks” of their policy.

The Trump administration appealed to the Ninth U.S. Circuit Court of Appeals in San Francisco, preventing Kronstadt’s injunction from taking immediate effect. But on Friday, when the Justice Department’s first filing was due, department lawyers instead told the court, without elaboration, that the government had decided an appeal was “no longer warranted.”

That means the government must start providing care immediately, said attorney Amy Lally of the Sidley Austin law firm, which represented the parents along with the nonprofit Public Counsel.

The family-separation policy was “intended to cause mental harm, intended to traumatize as a measure of deterrence” to border-crossing, Lally said in an interview.

The ruling covers families who were separated between July 2017 and July 2018 when the suit was filed. Based on government reports, Lally said, at least 3,500 parents will be eligible for care, and possibly many more. Mental health professionals who examine them will also decide whether their children need treatment, she said.

Then-Attorney General Jeff Sessions announced the “zero tolerance” policy in April 2018 and said it would be used to prosecute everyone who crossed the border without authorization. Under the policy, children were held in federal facilities while their parents were taken elsewhere — a practice that, evidence later showed, had been in effect since July 2017.

President Trump issued an executive order in June 2018 halting family separations. After a court order in another case, nearly all the children have been reunited with their parents.

Regardless, said Ken Berrick, chief executive of the Seneca Family of Agencies, a treatment organization supporting the lawsuit, “it will take years of intensive support and treatment to address the trauma caused by the separation.”

Justice Department lawyers also argued that there was no need for mental health care because any harm caused by separation had been cured when the families were reunited. But Kronstadt said there was evidence that “reunification after separation is not alone a sufficient cure.”

He also rejected the Justice Department’s claim that no further treatment was needed because initial screenings provided by the government after family reunification did not show serious harm. The plaintiffs offered evidence to the contrary, Kronstadt said.

Lally said that the ruling applies to families who are in the United States, and that further proceedings will determine whether it also requires treatment for those who returned to other countries after being separated. She said she and her colleagues have been told that the Department of Health and Human Services was about to sign a contract with a “reputable” provider of mental health services.

Bob Egelko is a San Francisco Chronicle staff writer. Email: begelko@sfchronicle.com Twitter: @BobEgelko