IT was hailed as being ''100 years ahead of its time'' when it opened in 1936 to care for the treatment of people with learning disabilities.

Hidden in a wooded estate, well outside Glasgow's city boundary, Lennox Castle hospital - built for (pounds) 1m - was chosen for its rural, peaceful and safe location.

Apart from a few who had jobs on neighbouring farms, the 1500 patients catered for at its peak, aged from 10 to 80, lived mainly in their own community, separate from their neighbours in Lennoxtown, with their own workshops, school and recreational facilities.

For around 25 years, until 1964, the hospital also had a maternity unit, where 1600 babies a year were introduced to the world.

Its most famous arrival, born in 1948, was christened Marie McDonald McLaughlin Lawrie, who later became known as Lulu, the pop star from Dennistoun. The unit was built when hospital accommodation in Glasgow for mothers in labour was at a premium.

Sixty-six years on, as the hospital prepares to give up the last of its patients to lead a richer, fuller life closer to the community, questions are still being asked about the wisdom of the old inter-war system which allowed the mentally handicapped to be locked up outside the cities in institutions like Lennox Castle.

A church service is being held in Lennoxtown Parish Church on Thursday, April 11, to give former residents, relatives, carers, and staff the opportunity to mark the closure of the hospital, which all too often over decades was immersed in controversy.

Next day, those instrumental in the moving of patients back into the community will join Scottish Executive and health and community officials at a dinner in Glasgow. The final 40 patients leave the following day.

Patients were first transferred from Stonyetts hospital, Glasgow, in 1929 and housed in the castle building. Glasgow Corporation built the hospital during the following seven years. Lennox Castle was completed and occupied by the Kincaid Lennox family in the 1840s, who gifted the land to the council.

Over many years, the hospital, one of the biggest of its kind in Europe, was criticised for being overcrowded and understaffed, with up to 50 patients in each ward forced to exist in an environment sometimes described as ''wretched and dehumanising''. Government parsimony over decades was blamed.

The Mental Welfare Commission and, more recently, the Scottish Health Advisory Service, were among bodies who criticised the poor quality of life for residents.

Relatives of residents said staff in the main appeared dedicated and made the best of disgraceful underfunding.

In the mid-1980s, the government spent millions of pounds building wards to improve the quality of life for patients. They had previously lived in huts built as temporary relief after they were moved out during the war to make way for blitz victims.

At the same time, in line with national strategy, patients began being moved away from institutionalised care towards integrated services in the community.

Among the first of those was Stanley Montford, who at 53 in 1986, began a new life in a specially adapted unit for the adult handicapped in Kirkintilloch. He had been a patient at Lennox Castle for more than 30 years.

Mr Montford, who had been handicapped from birth and suffered severely from epilepsy, was cared for at first by his parents and Arthur, his elder brother.

Arthur, the veteran broadcaster, said the hospital staff were ''always superb and worked under very difficult conditions''.

His brother took some time to adjust to his new surroundings but thanks to the patience of nursing staff, he now had a level of independence he never enjoyed before.

He added: ''In many ways, the closure of Lennox Castle ends a chapter. However, it's good to turn the page.''

When asked for her reaction about the closure, Lulu said: ''It is very sad. It is the end of an era.''

Jean Cherry, head occupational therapist at the hospital, where she worked for 19 years, said: ''Many people, including relatives and nursing and medical staff, were sceptical about moving the residents into the community. But today there is no doubt they have more opportunities and independence.''

She is among hundreds of staff, many from the local area, who will be redeployed within the NHS or have taken early retirement deals.

Greater Glasgow Primary Care NHS Trust is in discussions with a preferred developer about a possible mixed development of housing and leisure facilities on the 500-acre hospital site. Property experts estimate its sale could raise more than (pounds) 5m.

The trust is working with East Dunbartonshire Council, the local planning authority, and Lennoxtown Initiative - a community-led organisation - on the next chapter for the former hospital. The proceeds of the sale will be reinvested in Lennoxtown.