Sitting in an armchair in his cosy flat, three decades after being discharged from Ely long-stay mental incapacity hospital in Cardiff, the memories of John O'Brien's incarceration still loom large. His time at Ely was "horrible", he says, visibly recoiling. When asked where he would prefer to live, he passionately stabs the arm of the chair with his finger, declaring: "Here! Here!"

Like the vast majority of the UK's 300,000 or so people with severe learning disabilities, O'Brien lives in the heart of a community rather than in an institution. But his story is a rather extraordinary one.

Along with four other Ely long-stay patients, O'Brien was part of a pioneering "shared community living" experiment, which, 30 years ago, helped to set in motion a complete transformation of the care available to people with learning disabilities.

In 1974, O'Brien, then aged 21, Heather Howard, 16, Alan Duncan, 19, and Jackie Morgan and Paul Evans, both 20, were released from Ely to live in shared accommodation with a group of students from Cardiff University. The students, along with faculty members, had been so outraged by reports of abuse and maltreatment of patients at Ely that they took it upon themselves to change things.

In what has since been recognised as a landmark project, the students set up a charity in partnership with local social services. Student volunteers lived in a house with the ex-patients to help them integrate into wider society. The model of "supported living" championed by the Cardiff project is now the principal form of mainstream care provision for people with severe learning disabilities. But now some campaigners believe it is under threat.

Joan Benison, one of the original students in the Cardiff house, hopes this is not the case. "I look back to those days with such affection," she says. "We could never have known then just how much impact what we were doing would have. Who would have thought that what we were doing then would become a model for care for so many people."

Benison says she has to pinch herself at times to digest the changes in the care system inspired by the project. She recalls the experience as a time "filled with fun" and is thankful that, because of it, people with learning disabilities are able to do "the ordinary things that everyone else does and have the chance to develop as individuals in their own right".

The effects of long-term institutionalisation on the individuals involved was shocking in the early days of the project, Benison says. "For example, no one in the group recognised a potato in its original form. And when the bin men came to take the bins, the group thought they were stealing them. They had absolutely no idea of how everyday things happened."

Like Benison, the people who run the charity today - now called the Innovate Trust - believe that helping people to live as independent a life as possible offers the best opportunity for a good quality of life.

Two of the original group, O'Brien and Howard, currently occupy two of three self-contained flats in a house near Cardiff city centre managed by the trust. They receive one-to-one attention as and when they need it, and a care worker is always on hand.

This supported living gives residents the freedom to manage their own affairs. "The shock of leaving a hospital for people who have lived in it for the majority of their lives can be profound," says trust director Alex Bird. "It needs considerable input from case managers, but the rewards are enormous."

Howard, as she shows us around her immaculate flat, appears to revel in having her own space. She has difficulty communicating but, with the help of her care worker, relays a passion for shopping at Ikea and eating out.

Duncan now lives in a house a few miles away, but among his many activities (he's a keen pool player and is in a band called Spasm) he enjoys weekly cups of tea with O'Brien and stays in touch with Morgan, who now lives in Swansea.

That they are still contentedly living in the community is testament to the merits of this type of supported living provision. But campaigners are concerned about the emergence of alternative forms of care, such as new private long-stay hospitals. Mean while, the government continues, too slowly, with plans to finally remove those people still in NHS long-stay hospitals. The few hundred who remain are expected to be out by 2006.

Linsay McCulloch, deputy director of learning disability charity Values into Action, says the growing number of private hospitals could represent the reintroduction of a form of long-stay incarceration where people are once again institutionalised. Provision in private hospitals has grown by around 50% in three years, to around 1,000 places. She says that commissioners at a local level with responsibility for deciding on care options can favour private hospital facilities because they regard them as easier to set up and run. It's not about money, she argues, because running costs are comparable with supported living.

McCulloch explains: "It's really because offering individualised solutions takes more planning and time, and 'one size fits all' provision seems like the easier answer." She says that while central government has broadly backed supported living - specifically in its Valuing People white paper in 2001 - it needs to look closely at what is happening on the ground.

At Innovate Trust, they acknowledge that, in today's highly regulated environment, a project like the one in 1974 wouldn't be allowed. But they are adamant that its legacy is protected in the face of new threats.

After having tea and a chat with O'Brien, Howard, Duncan and their care workers, it is easy to see why campaigners across the learning disability field are so eager to preserve it.