COUNCILS have taken the first step towards unprecedented legal action against the Scottish Government in a row over teacher numbers.

Cosla, the umbrella organisation for local authorities, has taken legal advice on the issue and believes ministers have acted beyond their powers.

Officials now want the Scottish Government to return to the negotiating table before considering whether to enforce legal action.

Cosla has also attacked the Scottish Government on the choice of teacher numbers as a benchmark of how well they are running schools, arguing there is no evidence higher numbers of school staff leads to better standards.

Figures produced by Cosla show pupil teacher ratios in secondary schools have been getting steadily worse since 2007, but standards in S4 and S5 have improved.

Rory Mair, chief executive of Cosla, said: "We have now taken legal advice that suggests the Government has a case to answer about the legality of their behaviour over the teacher numbers issue and the imposition of this deal and we see this as such an incursion into local decision-making that it cannot be ignored.

"Council leaders are also concerned that, deliberately or not, Government has created an inaccurate and misleading picture about the way we have behaved. The idea that teacher numbers in Scotland are dwindling is nonsense and councils are not out to slash teacher numbers.

"In addition, the conventional wisdom that is being accepted or suggested by Government seems to be that a bigger number of teachers is linked to better outcomes for young people and our research shows that not to be the case."

The row erupted earlier this month after John Swinney, the Finance Secretary, blamed local authorities for breaking an SNP promise that teacher pupil ratios would be maintained.

In his Budget speech, he delivered an ultimatum that councils would be stripped of funding if they failed to stop the decline and also called on them to protect teacher numbers, which have fallen dramatically since 2007 when the SNP came to power.

Mr Swinney had originally offered Cosla £10 million this year in addition to £41m already allocated to maintain teacher numbers and pupil teacher ratios, but then chose to bypass the umbrella group by asking councils to sign up directly to the deal on an individual basis.

It is that move from a settlement negotiated with Cosla and articulated to councils in a letter to a situation where individual agreements are now being struck without wider consultation that has triggered claims the Government acted unlawfully.

However, a Scottish Government spokesman said it is committed to maintaining both teacher numbers and the pupil-teacher ratio.

She said it was also about getting the right number of teachers in schools to support pupils and added that it was hope local authorities would support this.

But despite £10m in extra funding, taking the total to £51m, to specifically support teacher numbers, the local government body had failed to reach agreement on the terms of a national agreement.

This, she added, had left no alternative but to seek local agreements.

She added: "Several councils have expressed a desire to meet with Ministers to discuss the offer, which we very much welcome."

"Teacher number commitments have been a feature of the local government finance settlements since 2011/12 and the failure to deliver on this agreed commitment in 2014/15, despite additional funding specifically for that, was a material factor in informing the Government's revised approach to funding in 2015/16.

She added that another meeting between the government and Cosla is planned, but added that ministers would not budget on the offer's conditions "Ministers have acted legally at every stage," she insisted.

There are 50,824 nursery, primary and secondary teachers in Scotland, the lowest number since 2003 and more than 4,200 fewer than in 2007 when the SNP came to power.

Pupils teacher ratios have increased from 13 to 13.6 over the last seven years.

Only 12.9 per cent pupils in the first three years of primary school are taught in classes which meet the Scottish Government's original target of 18 or fewer, compared to 21.6 per cent in 2010.