Abstract. Runaway electrons represent a serious problem for the reliable operation of the future experimental tokamak ITER. Due to the multiplication factor of exp(50) in the avalanche even a few seed runaway electrons will result in a beam of high energetic electrons that is able to damage the machine. Thus suppression of runaway electrons is a task of high importance, for which reason we present here a systematic study of runaway electrons following massive gas injection in TEXTOR. Argon injection can cause generation of runaways carrying up to 30% of the initial plasma current, while disruptions triggered by injection of helium or of mixtures of argon (5, 10, 20%) with deuterium are runaway free. Disruptions caused by argon injection finally become runaway free for very large amounts of injected atoms. The appearance/absence of runaway electrons is related to the fraction of atoms delivered to the plasma center. This so called mixing efficiency is deduced from a 0D model of the current quench. The estimated mixing efficiency is: 3% for argon, 15% for an argon/deuterium mixture and about 40% for helium. A low mixing efficiency of high-Z impurities can have a strong implication for the design of the disruption mitigation system for ITER. However, a quantitative prediction requires a better understanding of the mixing mechanism.