A federal judge has ordered the Trump administration to restore nearly $12 million in funding to the American Academy of Pediatrics as a lawsuit continues, according to the court decision described by the Associated Press.

U.S. District Judge Beryl Howell issued the preliminary injunction late Sunday in Washington, D.C., directing the U.S. Department of Health and Human Services to reinstate seven grants that were terminated in December, the decision says.

The ruling centers on whether HHS ended the pediatric group’s funding with a retaliatory motive. Howell wrote that the evidence showed HHS likely had a “retaliatory motive” when the department terminated the grants, and she said the dispute was not about which side has the better position on vaccination or gender-affirming care.

“This is not a case about whether AAP or HHS is right or even has the better position on vaccinations and gender-affirming care for children, or any other public health policy,” Howell wrote. “This is a case about whether the federal government has exercised power in a manner designed to chill public health policy debate by retaliating against a leading and generally trusted pediatrician member professional organization focused on improving the health of children.”

The seven terminated grants supported programs including efforts to prevent sudden unexpected infant death, strengthen pediatric care in rural communities, and support teens facing substance use and mental health challenges, according to the AP report.

The American Academy of Pediatrics alleged the cuts were retaliation for speaking out against the Trump administration’s positions and actions. HHS, the AP report said, told AAP in letters that the grants were cut because they no longer aligned with the department’s priorities, and the department denied AAP’s retaliation allegations.

Explaining why the injunction was warranted, Howell said AAP had shown it would suffer irreparable harm from the cuts. The judge also said the public interest favored letting the programs continue while the lawsuit proceeds.

Skye Perryman, president and CEO of Democracy Forward, which is representing AAP in the case, said in response to the ruling that “no administration gets to silence doctors, undermine public health, or put kids at risk, and we will not stop fighting until this unlawful retaliation is fully ended.”

An HHS spokesperson and attorneys representing the department declined comment, the AP report said.