Pottering in the garden has long been regarded as good for the soul. As far back as the Middle Ages, gardening was recognised for its therapeutic effects.

Now researchers have won £322,526 from the National Lottery Community Fund to assess whether gardening is so beneficial it should be prescribed by doctors. The charity Thrive, formerly the Society for Horticultural Therapy, and Loughborough University will examine whether patients who use gardening as a treatment make better recoveries from illnesses or accidents.

Stroke victims, people recuperating after severe surgery, adults with mental illness and elderly people have all been shown to benefit from regular gardening. The project will, for the first time, attempt to measure the extent of the physical, psychological and social benefits that can be provided by one of the nation's favourite pastimes.

Tim Spurgeon, advisory services manager of Thrive, said: "An increasing number of GPs are recognising the benefits of horticulture as a therapy. It increases self-esteem, builds confidence, offers basic and social skills and for some it even leads to qualifications and the opportunity to move into employment. We know it works; we now just have to prove it."

Thrive, which was set up in 1978, has four centres around the country, including two in London, one at Ryton near Coventry and one near Reading, Berkshire. There are a further 1,600 gardening projects at day centres, hospitals, prisons and in the community, which mainly take referrals from social services.