Several solvents were tested for the extraction of the alkaloids in Erythroxylum coca. The resulting crude extracts were analyzed by gas chromatography--mass spectrometry. Ethanol extraction was found to be the only quantitative method presenting no artifacts. It was established that cocaine and cis- and trans-cinnamoylcocaine were the endogenous alkaloids in E. coca leaves. From the several breakdown compounds arising during long-term extraction with H2SO4 or CHCl3, ecgonine methyl ester was the only alkaloid fully identified; ecgonine methyl ester was tentatively identified on the basis of its mass spectrum fragmentation pattern. Quantification by mass fragmentography of the three endogenous compounds was performed using a stable-isotope dilution technique on individual leaves of single branches of E. coca, E. novogranatense and E. novogranatense var. truxillense. The relative amounts of these alkaloids changed with leaf age as well as between species and varieties. The variation in alkaloid levels between individual leaves was too great to allow the use of the ratio between cocaine and the cinnamoylcocaine levels as a taxonomic marker. The initial pH value of 17 different alkaline substances traditionally used during coca leaf chewing was measured after dissolution in H2O; values ranged between 10.1 and 12.8. Buffer capacity was determined by titration with HCl. Three types of curve shapes were obtained which could correspond to NaOH, Na2CO3 and NaHCO3 titration curves. One sample of alkaline material had no buffer capacity at all. The recovery and breakdown of the cocaine contained in E. coca leaf power was monitored for one hour at various pHs at 37 degrees C. The levels of cocaine and benzoylecgonine did not change by more than 17% at any of the pHs tested (6.0, 9.0 and 11.5). It was concluded that the alkaline substances are mainly responsible for the transformation of the alkaloids to free bases and not for a major hydrolysis of cocaine.