It has been used for a number of medical conditions for hundreds of years. It is also the basis for making LSD.
Ergot growing in rye