But they added that the results show psilocybin has significant potential to treat the thousands of sufferers for whom traditional antidepressants do not work.
Health experts welcomed the trial, funded by the Medical Research Council, as a breakthrough that could "revolutionise" treatment.
Amanda Feilding, of the Beckley Foundation research centre in Oxford, said: "For the first time in many years, people who were at the end of the road with currently available treatments reported decreased anxiety, increased optimism and an ability to enjoy things. This is an unparalleled success."
The study was led by Professor David Nutt, who was sacked from his job as the Government's chief adviser on drugs in 2009 after saying ecstasy and LSD were less harmful than alcohol.
His team spent three years securing Home Office permission to use the Class A drug psilocybin. It was then manufactured by a private firm, at the cost of £23,400 per gram - enough for 40 doses.
Patients took the equivalent of five mushrooms, enough to "trip" for up to six hours, while closely supervised by two psychotherapists.
Dr Robin Carhart-Harris, of Imperial College London, said: 'This isn't a magic cure, but even so the effects at this stage do look promising.' Participants reported side effects including confusion, nausea and headaches, and two suffered a brief episode of mild paranoia.
Crucially, anyone with a history of psychosis - a problem linked to hallucinogens in the past - was excluded. Dr Carhart-Harris stressed that the study was conducted under close medical supervision, and that people should not try magic mushrooms themselves.
Since the patients knew what they were taking, the scientists said the results are open to question, but they are planning further trials to prove the drug works.
Professor Nutt said that if those trials prove successful, and the drug were to be licensed, people could take it every three or four months under clinical supervision.
He added: "If even 10 per cent [of sufferers] are treatment-resistant, then it is going to be hundreds of thousands of people who will be potentially eligible."
Nigel Campbell, of Rethink Mental Illness, said: "The key issue is whether psilocybin can be administered safely and effectively, and this study is a promising first step."
It left me feeling more optimistic
Kirk Rutter is one of the hundreds of thousands for whom traditional antidepressants do not work.
The 45-year-old fell into a deep depression four-and-a-half years ago, after the death of his mother.
Pills did not help, so he agreed to join the trial involving the active compound in magic mushrooms.
The university technician from London said: "I was very nervous as I had no prior experience of psilocybin. However, the team explained the research and guided me through the process."
He added: "I experienced something called psychedelic turbulence ... [which] caused me to feel cold and anxious. However, this soon passed, and I had a mostly pleasant and sometimes beautiful experience.
"There were certainly some challenging moments ... [but] following on from the sessions I felt lighter and more optimistic than I had in quite some time. However, it certainly wasn't a quick fix and I needed to work at staying positive."