This study investigated the use of ultrasound-assisted extraction to improve the extraction efficiency of morphine, codeine and thebaine from the papaver plants. Extraction conditions such as type of solvent, temperature, duration, frequency and power level of ultrasonic were optimized and the influences of different parameters on resolution of alkaloids in CE were studied. The optimized condition for CE separation includes a sodium phosphate buffer (100 mM, pH 3.0) containing 5 mM alpha-CD. The optimized extraction conditions for ultrasound-assisted extraction was an extraction time of 1 h, an ultrasonic frequency of 60 kHz with water-methanol (80:20) at 40 degrees C as the extraction solvent. The LOD for alkaloids was found to be 0.1 microg/mL at a signal-to-noise ratio of 3:1. The RSDs for peak areas were in the range of 1.4-4.4%. The amounts of opium alkaloids (mg/100 g dried sample) in four Iranian papaver plants were found to be in the range of 7.8-8.7 (morphine), 5.5-9.5 (codeine) and 1.4-10.4 (thebaine). It should be emphasized that no cleanup of the filtered extract was required; hence, direct determination after extraction drastically simplifies the analytical process.