COLUMBIA, S.C. (AP) – An agreement between South Carolina’s education agency and a historically failing school district has ended a lawsuit claiming the state unconstitutionally seized control from the locally elected board.

Officials with the state and Allendale County School District jointly asked the state Supreme Court on Friday to dismiss the case filed last month.

The lawsuit followed Superintendent Molly Spearman’s emergency declaration to take over the rural county’s four schools.

The agreement restores some authority to the local board. That includes giving final budget approval, deciding student discipline appeals and providing input on hiring decisions.

But Spearman retains the final say over hiring and firing. The board also agrees not to influence or interfere with day-to-day operations.

Agency spokesman Ryan Brown says the agreement avoids wasting taxpayer dollars on a court fight.

(Copyright 2017 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)