They did indeed use the AM in religious rituals and AM does have deliriant and hallucinatory effects and more. This would mean not only is it linked to religion and religious social structures in the ceremony, but there is a significant link that it produced these experiences by way of muscimol induced hallucinations. Since its consumption began fifty thousand years ago, it would put its use on the very beginning of religion itself. The idea that this is somehow a fallacy is far from the truth as not only is there a religious connection but the connection began at the same time.
Leviak B. Kelly Religion: The Ultimate STD: Living a Spiritual Life without Dogmatics or Cultural Destruction