Upon injury, psychotropic psilocybin-producing mushrooms instantly develop an intense blue color whose structure and mode of formation has remained elusive. Here, we report on two enzymes from Psilocybe cubensis that represent the two-step cascade to prepare psilocybin for oxidative oligomerization. The phosphatase PsiP removes the 4-O-phosphate group to yield psilocin, while PsiL oxidizes its 4-hydroxy group. The PsiL reaction was monitored by in situ 13C NMR spectroscopy, which indicated that oxidative coupling of psilocyl residues occurs primarily via C-5. MS and IR spectroscopy indicated formation of a heterogeneous mixture of preferentially psilocyl 3- to 13-mers and suggest multiple oligomerization routes, depending on oxidative power and substrate concentration. The results also imply that psilocybin's phosphate ester serves a reversible protective function.