Generally, all the plants used to make Ayahuasca are legal but some of the compounds in the substance are illegal. For example, Dimethyltryptamine (DMT) is a Schedule I drug under the Convention on Psychotropic Substances. Schedule I includes those supposedly dangerous drugs that are claimed to create a serious risk to public health, and the drugs therapeutic value is doubtful or nil.
In the United States, its legal status is a little ambiguous. Plants and the preparation of Ayahuasca appear to be legal since most of the brewed substances have no schedule I substances. But if the brew has been mixed with an ingredient that will have a DMT in it, then it becomes illegal. Recently, there has been a move to make it illegal but none of the cases have been decided in the United States and Europe if Ayahausca and its components are illegal. But there have been reports of arrests for the possession of Ayahuasca.
There was a challenge in the courts in the United States for use of the brew during religious rites. Specifically União do Vegetal (UDV) challenge it at the United States Supreme Court and has won the case by allowing the Church of União do Vegetal to use the substance in their religious ceremonies and practices under the Religious Freedom Restoration Act. This was welcomed by the Ayahuasca-based religions that are present in the United States.
In Brazil, it has been a great legal battle but it was finally declared that Ayahuasca use is deemed legal if used in religious practices and ceremonies. The courts in Brazil declared that Ayuhuasca is not a recreational drug and has spiritual uses.
In France, four months after declaring that Ayahuasca can be used by the church of San Daime, they declared it illegal because most of the common ingredients of Ayuhuasca including harmala were declared narcotic schedule I. Consequently, It made the Ayuhuasca and its ingredients illegal to even possess.
In Canada, harmala is considered a schedule III substance. And since most brews contain harmala, it might be possible that it is illegal in this country. In Spain and Germany, there have been reports of arrest made with possession of Ayahuasca and its ingredients but all were eventually freed.
In the Netherlands, Santo Daime has won a court case involving the use of Ayahuasca in its religious practice and ceremonies. According to the UN, Ayahuasca and its ingredients including plants with naturally occurring DMT is not a controlled substance under the 1971 Convention on Psychotropic Substances. Therefore, the preparation and possession of Ayahuasca and its ingredients are not at present under international control and not subject to any articles of the 1971 Convention Psychotropic Substances.