Gas chromatography was used in combination with flame ionization detection (GC-FID) to develop a method for determining cocaine and its two metabolites, benzoylecgonine (BEG) and ecgonine methyl ester (EME), in bile and vitreous humor. The method used a 12 m x 0.2 mm i.d. column of 0.33 microm film thickness packed with 5% phenylmethylsiloxane, and proadifen as a reference compound. Drug-free bile and vitreous humor samples were used to prepare solutions of the target compounds at concentrations over the range 0.1-4 microg ml(-1) that were subjected to solid-phase extraction through Bond Elut Certify columns and derivatized with 99:1 (v/v) N,O-bis-trimethylsilyltrifluoroacetamide (BSTFA)/trimethylchlorosilane (TMCS). Calibration graphs were highly linear, with correlation coefficients above 0.99 in all instances. Also, the precision of the method was found to be quite acceptable, with coefficients of variation less than 5% for bile and less than 7% for vitreous humor. The average extraction yields ranged from 73.6% to 91.2% for bile and from 71.5% to 92.2% for vitreous humor. The proposed method was used to analyse 26 samples of bile and as many of vitreous humor from individuals fatally poisoned by cocaine, whether alone or in combination with other drugs. The mean drug levels found were 0.75 and 1.54 microg ml(-1) for cocaine in bile and vitreous humor, respectively, 6.35 and 0.94 microg ml(-1) for BEG, and 2.18 and 0.61 microg ml(-1) for EME.