A "short, sharp shock" has helped councils enter the local elections having made improvements to the way they run schools, an education expert has said.
Three years ago over a quarter of Wales' 22 councils were not performing well enough according to the schools watchdog and were in special measures.
Last year they had all been taken out of monitoring by inspectors at Estyn.
But Dr Phillip Dixon said improvements were "from a very low base".
Between 2011 and 2013 six local authorities' schools departments were placed in special measures by Estyn - the schools inspectorate's emergency category.
It led First Minister Carwyn Jones to say in 2014 that he believed some councils were incapable of improving education in their area.
And responsibility for school improvement was removed from councils and given to four regional consortia.
By the beginning of 2016 all councils had improved sufficiently to be lifted out of special monitoring by the watchdog.
Dr Dixon, a former director of education union ATL Cymru, believes there have been improvements to how councils have run schools in recent years.
Placing some councils in special measures was a "real encounter with reality because some of them were kidding themselves", he said.
"Overall things are looking up and things are going in the right direction.
"But we shouldn't be complacent - it should have been happening before."
Disappointing Pisa results - in which Welsh pupils performed worse than those in the other parts of the UK - suggest that councils still face major challenges in playing their part to boost those international test results.
And when it comes to the elections some voters will look at a local school which is underperforming or under financial pressure, and not recognise an "improving" picture.
Welsh Local Government Association chief executive Steve Thomas said that it was "pleasing" that there were no councils in special measures at the moment.
"Hopefully we can talk over the next five years about a continuing journey of school improvement and we need that to get up the Pisa rankings," he said.
But if that aspiration is realised, it will have to be done in a climate of continued budgetary belt-tightening.
Of the £2.5bn gross schools funding, 84% (or £2.1bn) goes directly to schools; the rest is spent centrally by councils on school transport and services for pupils with additional learning needs, school meals and milk.
"We have protected school budgets over the last five years," Mr Thomas said.
"But schools are under pressure, there's no doubt about that."
And that can mean having to cut staff and courses.
For councils, there are wider strategic decisions to make.
"There's inevitably a pressure for schools to federate in terms of schools coming together to share costs," he said.
It is inevitable too, Mr Thomas believes, that "some small schools across Wales will continue to be subject to school closure programmes".
Decisions to close or reorganise schools are almost always controversial and some local authorities have been wrangling with decisions about how education is delivered in their areas for years.
In recent months plans to reorganise schools have raised passions in Pembrokeshire, Powys and Carmarthenshire.
A row about the future of Ysgol Llangennech, near Llanelli, has been particularly bitter after Carmarthenshire council voted to drop the English stream and make it a Welsh-medium only school.
And in rural areas cutting surplus places has been a mantra as demographic changes have meant a fall in the number of pupils.
But changes to Welsh Government guidance for councils could affect those plans if a presumption against the closure of rural schools is introduced as planned by Education Secretary Kirsty Williams.
Councils have a major role in shaping the education of young people but whatever happens in the elections, decisions on schools will have to be made within the context of Welsh Government policy and severe budgetary constraints.