Heroin (3,6-diacetylmorphine) and several important extraction and synthesis impurities (morphine, 6-monoacetylmorphine, codeine and 6-acetylcodeine) were determined in illicit drug samples, using high performance liquid chromatography with 'parallel segmented flow', which enabled the simultaneous use of three complementary modes of detection (UV-absorbance, tris(2,2'-bipyridine)ruthenium(III) chemiluminescence and permanganate chemiluminescence). This rapid and sensitive approach for the analysis of street heroin was used to explore the chemistry of a proposed heroin screening test that is based on the relative response with these two chemiluminescence reagents using flow injection analysis. Although heroin was the major constituent of the six drug samples (between 16% and 67% by mass), the synthetic by-product 6-acetylcodeine (2.5-8.3%) made a greater contribution to the total [Ru(bipy)3](3+) chemiluminescence response of the screening test. The signal with permanganate was primarily due to the presence of 6-monoacetylmorphine (0.9-29%), and was therefore indicative of the degree of sample degradation during clandestine manufacture or poor storage conditions prior to the drug seizure. In the second part of the screening test, the sample is treated with sodium hydroxide, which results in a large increase in the signal with permanganate, due to the rapid hydrolysis of heroin to 6-monoacetylmorphine. As the emission of these two reagents with morphinan-alkaloids and their derivatives largely depends on the substituent at the O(3) position, the slower hydrolysis of 6-monoacetylmorphine to morphine, and 6-acetylcodeine to codeine, did not have a major impact on the characteristic pattern of responses in the screening test.