Dozens of Scottish councils could be breaking the law by reducing support for disabled people when they become adults, a charity has warned after a court ruling.

The judgment at Kirkcaldy Sheriff Court against Fife Council is believed to be the first time new equalities legislation has been tested.

The court ruled Fife Council broke the law by cutting support for a disabled student the day he turned 18. By ending David ­Miller's support package solely on the basis of his age, the council breached the 2010 Equality Act and the Public Sector Equality Duty, by failing to assess his needs or consider the impact the change would have on him. In both cases it was the first time these provisions have been upheld in court.

The sheriff said that after Fife removed the funding for support that enabled him to attend an independent residential school, Mr Miller had simply been cut loose.

The judgment said: "From that moment on, nothing was done to assist the pursuer's transition from school to adult life. He was, in effect, abandoned."

Susan Grasekamp, chief executive of Scottish Disability Equality Forum, said: "David's case is sadly far from unusual. Many councils appear to believe their duties towards a disabled young person somehow change when they become termed 'an adult' at 18. However, as this case shows, a council's responsibilities under the law don't change with age."

Councils can be tempted to cut budgets when someone becomes an adult, she said. "The extreme pressure on adult social care budgets means the result can be a significant reduction in the provision of specialist equipment, support or funding.

"But this case sets a precedent affecting local authorities. It ensures they have a legal as well as moral duty to provide adequate support for disabled young people regardless of their age."

Mr Miller's mother, Dr Kate Miller, said: "This has been a long and difficult process. It has had a huge impact on David, who feels that he was simply written off as not being worth further support as soon as he turned 18.

"If the council had devoted a fraction of the time, effort and money it spent on fighting this case to managing and supporting David's transition from school to what he wanted to do next with his life, everyone involved would have benefited. I hope this ruling will ensure other young disabled people get the support they deserve."

Lynn Welsh, head of Legal ­Scotland at the Equality and Human Rights Commission, added: "The Equality Act requires service providers not to discriminate in the provisions of services. The court has found Fife Council clearly did discriminate in relation both to David's age and disability when they set the arbitrary date of his 18th birthday to remove the support package which allowed him to continue his studies.

"We would expect other authorities to ensure their own policies and practices do not discriminate in a similar way."

Colin Young, senior outcomes officer at the Health and Social Care Alliance, said the council appeared indifferent to the needs of young people with additional support needs when they became adults.

"Transition for any young person should be an exciting, optimistic time. David's wish to continue in education should have been enabled to reflect his right to learning opportunities, increasing autonomy and his opportunity to live independently."

A spokeswoman for Fife council said: "We do not feel it's appropriate to comment and discuss the detail of individual cases publicly.

"We are committed to helping young people plan and choose the best, most appropriate pathway from school to post-school destinations for them."

She added: "We are now following legal advice and appealing the decision made by the sheriff."