A flow injection system was developed for the sequential determination of total nitrogen and phosphorus in digests of vegetables using potentiometric and spectrophotometric detection systems, respectively. A tubular ammonium selective electrode with a sensor system composed of nonactin/monactin in tris(2-ethylhexyl) phosphate was used. The selectivity limitations of this electrode were overcome by the inclusion of a gas-diffusion unit in the system that separated ammonium from the rest of the sample matrix and allowed the determination of total nitrogen and phosphorus by the partition of the sample plug between two streams. The results obtained with the developed FIA system were in good agreement with those of the reference methods. Sampling rates from 40 to 60 samples per hour and relative standard deviations below 3.5% were achieved.