More than 200 herbs and spices were used in combinations to provide early painkillers and anaesthetics, antiseptics and anti-depressants for the retreating English armies - in some cases hundreds of years before their first previously recorded use.
Though the discovery has surprised historians, it will be greeted with quiet satisfaction by addicts of Ellis Peters' Brother Cadfael books - whodunnits about a medieval monk who potters in his herb garden, concocting remedies.
Detailed examination of the "medical waste" - mainly blood and human remains - retrieved from the drains of Soutra Hospital near Edinburgh, show that the Augustinian brethren who ran it for 500 years, from the 12th to the 17th centuries, were sophisticated physicians able to offer everything from major surgery to sleeping draughts for insomniacs.
Battle-scarred soldiers facing amputation were anaesthetised with a cocktail of black henbane, opium and hemlock - several hundred years before the age of anaesthetics is understood to have begun with the discovery of ether and chloroform in the 1830s. Pregnant women were given ergot and juniper berries to induce labour long before natural childbirth was thought of, and patients afflicted with melancholia were offered St John's wort - still in use and known as "nature's Prozac".
Records held in archives at Edinburgh's National Museum show that the hospital, one of the largest in Europe in the Middle Ages, was taken over on at least 80 occasions by English armies. Dr Brian Moffat, the archaeologist who has led the investigation, said that some English kings returned again and again. "It was usually the ones with blood on their hands - Edward I, II and III. One can only assume the facilities were up to their standards. They didn't like to rough it, you know."
Dr Moffat, who describes himself as a professional muckraker, has been analysing the contents of the hospital's drains for more than a decade looking for clues to the remedies and treatments used. Grisly evidence of amputations comes from the "surgical offcuts" that litter the site and mixtures of seeds indicate the drug cocktails that were given. "Discarded seeds are the mirror image of a recipe. If you can get hold of the seeds you can get inside the mind of the medieval physician," said Dr Moffat.
Opium was mixed with lard to provide an analgesic salve for wounds. The addition of myrrh, a highly efficient bactericide, and honey gave it antiseptic as well as painkilling properties. The use of myrrh, which came only from south-west Arabia, suggested the hospital was rich and well-connected.
Infestations of lice and scabies, frequent among the malnourished, were treated with arsenic preparations which were still in use in the Royal Edinburgh hospital in the 1960s. Worm infestations were treated with tormentil, a herb similar to the more common silverweed. Tincture of tormentil is still available from chemists as a treatment for worms and as an astringent for diarrhoea.
"What this means is that in 800 years, that treatment has not been improved on. The reason you may not have heard of it is that drug companies cannot make a profit out of something that grows on every Scottish hilltop," Dr Moffat said.
The findings have stirred debate in medical circles over whether the medical history books will have to be rewritten. Professor Adam Smith of the Royal College of Surgeons of Edinburgh told BBC Radio 4's Today that Dr Moffat had provided a new picture of medieval anaesthetics. "We had always thought the simplest anaesthetic was to give an overdose of alcohol and render the patient senseless," the professor said.
Dr Moffat said: "Our research provides proof positive of the use of anaesthetics 500 years before [medical circles] recognise it."