The S.C. Department of Social Services has been without a permanent director since July and under a federal court order to improve services for roughly 4,600 children in its care. The struggling agency could be fined for contempt of court and ordered to pay attorney fees if it is unable to meet goals for hiring child welfare caseworkers, improving the health care of its wards, and moving more children out of group homes and into foster care.

It’s a tall order made more dire by a legislative budgeting committee that flatly rejected $44.6 million for hiring additional caseworkers, apparently over the agency’s disappointing lack of progress over the past couple of years. This was despite interim DSS Director Joan Meacham telling panel members the agency would be unable to meet its court-ordered obligations without the money.

The $44.6 million would go toward hiring 121 caseworkers and 25 supervisors, and filling about 10 other positions meant to improve recruitment and retention.

Lawmakers also have expressed frustration with DSS for being unable to get answers about how many children died while in the agency’s care over the past year.

That’s somewhat understandable. The agency was budgeted to hire 186 caseworkers and 25 supervisors this fiscal year.

The agency is asking for $3.3 million to create a “child welfare information system,” which is expected to be operational next year.

Additionally, DSS is asking for $33.6 million for caseworker raises and efforts to recruit and retain caseworkers.

Despite their frustrations with DSS, lawmakers must provide funding necessary for the agency to comply with the class-action settlement. In fact, U.S. District Judge Richard Gergel, who is overseeing the case, could order the state to provide it. Otherwise, taxpayers would ultimately be on the hook for contempt of court fines and attorney fees.

DSS has made some improvements over the past few years by doing a better job of investigating abuse complaints, raising pay for foster parents and increasing caseworker visits with foster children. It has also stopped housing children in substandard group homes, including hotels and offices. Those are all welcome developments.

But that progress, albeit meager, cannot be allowed to stall. Providing for the welfare of children who have been removed from their homes through no fault of their own is a basic civic obligation.

Despite initially rejecting DSS funding, the House Ways and Means Committee did agree to form a panel to address issues facing the agency. Reforms include the possibility of turning over some duties, such as distributing food stamps, to another agency. That would help DSS focus on its core child welfare mission.

The Legislature can no more afford to ignore DSS than the court. Lawmakers must at least fund the agency at the level required by the judge. The governor’s panel charged with selecting a new director — it reportedly is in the final stages of making a pick — must also wrap up its work.

Children shouldn’t have to pay the price for governmental dysfunction. The state must get its act together.