Thousands of Scottish families whose children need extra help in the classroom will no longer have the right to choose a school in a different local authority following a landmark legal ruling attacked as "discriminatory" by campaigners.

A judgment at the Court of Session in Edinburgh has found there is no provision for such families to make so-called placing requests to other councils in legislation drawn up in 2004 which governs how children with additional support needs are dealt with.

The ruling does not affect the rights of every other parent to seek to place their children in a neighbouring local authority area because that right is enshrined in different legislation.

However, it will have an impact on some 25,000 Scottish children who have additional support needs - a term which covers a range of complex conditions such as autism, but which can also apply to pupils who are struggling because they are bullied or have had a bereavement in the family.

The ruling by three Law Lords at the inner house of the Court of Session was made in the case of Wilma Donnelly, from West Dunbartonshire, who made a placing request on behalf of her son Mark, who has cerebral palsy and is registered blind.

After a lengthy legal battle to move Mark, now 16, from a mainstream school in West Dunbartonshire to a special school in Glasgow, the judges ruled that, although the local authority could make a placing request on her behalf, there was no provision for her to make such a placing request under the Education (Additional Support for Learning) Act 2004.

In the opinion of the court, delivered by Lord Macphail, the 2004 act did not make any provision for a child with additional support needs to make a placing request "to any education authority who are not responsible for the child's education".

Last night, Iain Nisbet, a solicitor with the Govan Law Centre, whose education law unit is representing Mrs Donnelly, said he intended to appeal against the ruling to the House of Lords. If the appeal is unsuccessful, he believes there is a need to change the law in Scotland to protect choice for all families.

"This ruling places all parents of children with additional support needs, many of whom do not see their children in this way, in an impossible position because it restricts the choice they have over where their children go to school.

"This judgment will mean that many children expecting to attend schools across council boundaries will not be allowed to go and it seems particularly unfair given that the rest of the population will continue to enjoy that right.

"If the House of Lords rule against us, then I believe there is a need for an urgent legislative change in Scotland to establish those rights of a placing request to all parents and end this discrimination."

A spokesman for the National Autistic Society echoed the concerns.

He said: "Children with autism have a wide variety of needs, but the right educational support can make a huge difference to their well-being and their future opportunities.

"It's crucial that there is a structure in place to enable parents to access the right support for their children, whether or not this is within their local authority area."

A Scottish Government spokeswoman said: "We are carefully considering the implications of the decision, but it would be inappropriate to comment until it is known whether there is to be a further appeal to the House of Lords."