The Trump administration must restore hundreds of millions of dollars in AmeriCorps grant funding and thousands of service workers in about two dozen states, a federal judge ruled Thursday.

U.S. District Judge Deborah L. Boardman granted a temporary block on the agency’s cancellation of grants and early discharge of corps members, but only for the states that sued the administration in April.

Maryland Attorney General Brown led the charge on the multi-state lawsuit.

“This ruling safeguards these life-changing services that help build a better Maryland,” Brown said in a press release on Thursday. “As this case continues, I will do everything in my power to defend these essential programs from the Trump administration’s unlawful and reckless cuts.”

The Baltimore Banner thanks its sponsors. Become one.

The federal lawsuit, filed by Democratic state officials across the country, accused President Donald Trump’s cost-cutting efforts through the Department of Government Efficiency of reneging on grants funded through the AmeriCorps State and National program, which was budgeted $557 million in congressionally approved funding this year.

Maryland state officials estimated in May that around $12 million in grants and 550 AmeriCorps positions were cut across 20 programs, including the Appalachian Service Through Action and Resources program at Frostburg State University.

Programs and nonprofit leaders were “shocked” and “devastated” in late April when they received emails directing them to immediately stop all work as their grants evaporated overnight. Some had to tell their AmeriCorps members not to show up the following day or week.

AmeriCorps oversees several programs that dispatch hundreds of millions of dollars and tens of thousands of people to serve in communities across the country.

Boardman also said all AmeriCorps National Civilian Community Corps members that were discharged from their service terms early should be reinstated, if they are willing and able to return.

The Baltimore Banner thanks its sponsors. Become one.

But Boardman allowed the 30-year-old federal agency for volunteer service to proceed with its reduction in force, denying the states’ request to restore the majority of staff that were put on administrative leave in April.

AmeriCorps employs more than 500 full-time federal workers and has an operating budget of roughly $1 billion.

The lawsuit was filed by officials in Maryland, Delaware, California, Colorado, Arizona, Connecticut, Washington, D.C., Hawaii, Illinois, Kentucky, Maine, Massachusetts, Michigan, Minnesota, Nevada, New Jersey, New Mexico, New York, North Carolina, Oregon, Pennsylvania, Rhode Island, Vermont, Washington and Wisconsin.