Reaction of 3-aminopyrrole with seven 1,3,5-triazines was studied in a one-step reaction (in situ formation of 3-aminopyrrole) and a two-step reaction (using the tetraphenylborate salt and an amine base). An inverse-electron demand Diels-Alder reaction (IEDDA) was observed with R1 = CF3, CO2Et, and H with the formation of 5H-pyrrolo[3,2-d]pyrimidine derivatives. S(N)Ar was observed when 2,4,6-trifluoro- or 2,4,6-trichloro-1,3,5-triazine were used--1,3,5-triazines that had leaving groups. If excess 1,3,5-triazine was present the initial S(N)Ar product reacted further, in the presence of acid and water, with another equivalent of 1,3,5-triazine to give compounds containing three linked heterocyclic rings. No reaction was observed with R1 = C6H5 and OCH3. Four mechanisms are proposed to explain the experimental results: uncatalyzed and acid catalyzed inverse electron demand Diels-Alder cascades leading to cycloaddition, and uncatalyzed and acid-catalyzed S(N)Ar reactions leading, respectively, to single and double substitution products. Acid catalysis was a factor when there was reduced reactivity in either reactant.