At a hearing in Edinburgh, Sheriff Nigel Morrison dismissed an appeal by a family who wished their daughter to be accepted into Hermitage Park primary, although she was not resident in the school's catchment area. The written judgment is expected later.
Several "non-district" parents went through the city council's own appeals process which upheld the original decision to refuse them a place, including the case of the Hermitage Park pupil whose parents then took the council to court.
In common with other authorities, Edinburgh has operated a policy of limiting intakes to P1 and S1 to avoid overcrowding in popular schools.
A decreasing school population, however, has led the council to think more long-term to avoid creating classes that would require the employment of an additional teacher, an argument which was upheld by the sheriff.
Edinburgh will now press ahead with plans to limit the primary 1 intake at six primary schools to one and a half classes of 43 pupils rather than two.
The measure means that when next year's intake arrives, the schools can create a P1, P2 and a P1-P2 composite class.
Frank McGrail, a senior council official, said the intention was to avoid having to create an extra class for non-district pupils in oversubscribed schools.
Mr McGrail denied that it was a cost-cutting measure, as the parents alleged. "We are keeping our expenditure within budget in line with the grant we receive from the Scottish Executive," he said.