Pupils starting secondary school in Scotland this week will nearly all be taught in classes of 20 or below for maths and English after the majority of local authorities met key Scottish Executive targets.

Pupils starting secondary school in Scotland this week will nearly all be taught in classes of 20 or below for maths and English after the majority of local authorities met key Scottish Executive targets.

A survey by The Herald found that of the 28 councils that responded only one, Midlothian, expected to miss the target of an average of 20 in S1 and S2 - and that is only in one department due to a lack of accommodation.

The targets were set by the former Labour-led executive as part of moves to raise standards of literacy and numeracy in the early years of secondary school where traditionally pupils can "tread water" after the move from primary.

The policy was also introduced to appease increasingly vocal demands from teaching unions such as the Educational Institute of Scotland (EIS) to reduce class sizes to a maximum of 20 in all schools.

Following the SNP victory in May's Scottish Parliament elections, Fiona Hyslop, Education and Lifelong Learning Secretary, called on councils to reduce class sizes in line with the previous government's policy with a view to further reductions in future.

Last night, an executive spokeswoman welcomed the figures and underlined the executive's future commitment to reduce class sizes to a maximum of 18 from P1 to P3.

"If these results are correct then local authorities, schools and teacher training institutions should be congratulated on their efforts in reducing class sizes," she said. "This demonstrates that the education system can rise to challenges and we look forward to working with professionals to deliver our commitment to reduce P1 to P3 class sizes."

The EIS also congratulated councils, but also called for further reductions. Ronnie Smith, general secretary of the EIS, said: "While this news is welcome, it is just a small step along the path to smaller class sizes in all schools. We hope that the current executive will continue the process of lowering Scottish class sizes, which remain some of the highest in Europe."

However, the call for further reductions are likely to be less welcome in some local authority areas which have struggled to meet the targets.

In areas where population is sparse or falling, councils have been able to meet the class size targets relatively easily, but in popular authorities where schools are full, or those such as Aberdeen with a shifting population of migrant workers, it has been much harder.

Some local authorities are also concerned about the cost of employing the additional teachers required, while headteachers believe in some cases it is better for children to be taught in very small groups while others are taught in larger classes.

Isabel Hutton, education spokeswoman for Cosla, which represents local authorities, warned of too much of a focus on "one aspect" of classroom teaching in the future.

Hugh Henry, education spokesman for Scottish Labour, has already questioned the validity of blanket reductions in class sizes, quoting research which states that smaller classes are expensive and work best where there is a significant reduction. "There is a debate to be had about whether crude reductions in class sizes deliver the appropriate increase in educational attainment for the money," he said.

Murdo Fraser, education spokesman for the Scottish Conservative Party, said: "Teachers would rather be teaching a class of 30 well-behaved youngsters than a class of 20 where they had two or three who were poorly behaved."