AUGUSTA — The U.S. Department of Agriculture and state of Maine settled a lawsuit Friday that requires the department to continue payments that support school meals and other programs.

Agriculture Secretary Brooke Rollins stopped payments to Maine in April over concerns that the state is violating Title IX anti-discrimination law. Rollins said the state is violating the law by allowing transgender girls to participate in girls’ sports.

The settlement reached Friday prohibits Rollins from freezing funds without following federal procedures.

In response, Maine Attorney General Aaron Frey said he’s happy with the resolution.

“It’s unfortunate that my office had to resort to federal court just to get USDA to comply with the law and its own regulations,” Frey said. “But we are pleased that the lawsuit has now been resolved and that Maine will continue to receive funds as directed by Congress to feed children and vulnerable adults.”

Rollins wrote a scathing letter to Gov. Janet Mills on April 2 informing the state that she would freeze USDA funds that pay for meals for schoolchildren, afterschool programs and disabled adults in congregate settings.

“In order to continue to receive taxpayer dollars from USDA, the state of Maine must demonstrate compliance with Title IX's protection of female student athletes from having to compete with or against or having to appear unclothed before males,” Rollins wrote.

Five days later, Frey sued the USDA, saying that it had not followed procedures set out in law for withholding Congressionally approved spending.

The settlement signed Friday states that neither side in the dispute admits wrongdoing, but it does prohibit USDA from freezing funds based on alleged violations of Title IX unless the department follows federal procedures.

The suit is separate from one filed last month by the U.S. Department of Justice against the Maine Department of Education. That suit also alleges that Maine is violating Title IX by allowing transgender girls to compete in girls’ sports.