A new and simple ultrasonic-assisted extraction (UAE) procedure was developed for the determination of inorganic arsenic and selenium in foods by hydride-generation atomic absorption spectrometry (HG-AAS). The various analytical variables affecting complex formation and extraction efficiency were investigated and optimised. The method is based on selective complex formation of As(III) and Se(IV) in the presence of excess As(V) and Se(VI) with toluidine red in the presence of tartaric acid at pH 4.5, and then extraction of the resulting condensation products into the micellar phase of non-ionic surfactant, polyethylene glycol dodecyl ether, Brij 35. Under optimised conditions, good linear relationships were obtained in the ranges of 4-225 and 12-400 ng l(-1) with limits of detection of 1.1 and 3.5 ng l(-1) for As(III) and Se(IV), respectively. The repeatability was better than 3.9% for both analytes (n = 10, 25 ng l(-1)) while reproducibility ranged from 4.2% to 4.8%. The recoveries of As(III) and Se(IV) spiked at 25-100 ng l(-1) were in the range of 94.2-104.8%. After pre-concentration of a 5.0 ml sample, the sensitivity enhancement factors for As(III) and Se(IV) were 185 and 140, respectively. Accuracy was assessed by analysis of two standard reference materials (SRMs) and spiked recovery experiments. The method was successfully applied to the accurate and reliable determination of total As and total Se by HG-AAS after pre-reduction with a mixture of L-cysteine and tartaric acid. Finally, the method was shown to be rapid and sensitive, with good results for extraction, pre-concentration and determination of total As and Se contents (as As(III) and Se(IV)) from food samples.