The sensitivity and selectivity of gas chromatography for analysing several halogenated ester derivatives of beta-hydroxymyristic acid were studied using both selected-ion monitoring detection with negative-ion chemical-ionization mass spectrometry and electron-capture detection. Six different derivatization methods were compared with respect to yield, chemical stability and formation of by-products. Procedures for removal of excess reagents using disposable silica columns and thin-layer chromatography were elaborated. The 3-O-pentafluorobenzoyl-methyl ester was the preferred derivative since it provided high sensitivity and had the molecular ion as the base peak in the mass spectrum. The detection limit was 0.5 pg with electron-capture detection and 0.3 pg with the mass spectrometric system. Using beta-hydroxymyristic acid as a chemical marker it was possible to detect Escherichia coli endotoxin in aqueous solution at a level of 1 ng/ml.