Jack McConnell yesterday joined the condemnation of Midlothian Council after a breakdown in the management of its social work department exposed vulnerable children to abuse and neglect.

At First Minister's Questions, he described a raft of problems revealed this week by an HM Inspectorate of Education report as "desperately serious". He then warned all local authority social work managers to "get their house in order" to ensure children were fully protected.

However, unions and opposition MSPs reminded the Scottish Executive it has been accused of underfunding children's social work services by £160m a year.

On Wednesday, Malcolm McEwan, the council's social work director, quit in light of the report. Councillor Danny Molloy, who had political responsibility, also quit as the council's depute leader.

Mr McConnell welcomed the resignations, saying for far too long public and voluntary sector bodies had ducked responsibility for failings in child protection.

"On this occasion someone has taken responsibility and resigned. I would now hope to see early action by Midlothian Council to put in place and then execute an action plan that ensures that youngsters across Midlothian are better protected," he said.

Tory leader Annabel Goldie said the Midlothian problems were "horrific" and questioned how many other children were in similar danger elsewhere because of management failures.

Unions said social work managers in Midlothian were warned two years ago of a staffing crisis in child protection, but had failed to address the problem.

Lesley Greig, Midlothian Unison branch secretary, said social work staff had raised a grievance with managers in April 2005 about inadequate staffing and IT.

However, in December 2005, staff levels remained at "crisis point", she said.

In July 2006 social workers again wrote to managers to complain about the same problems. "Despite attempts to increase recruitment recently, the service is still being run with many inexperienced social workers and agency staff and experienced staff are leaving."

Last October, official figures showed Midlothian had the second highest social work vacancies of any Scottish council - 18%. However, a recent spurt in recruitment has reduced vacancies in the children and families unit to 3%.

Ms Greig also laid blame at the Scottish Executive's door. She said children's social work was consistently underfunded by government.

Last year, Professor Arthur Midwinter, budget adviser to Holyrood's Finance Committee, warned the Scottish Executive was underfunding all children's social work services by £160m.

At the time, Mr McConnell dismissed the figure.