The influence of K+, Mg2+, Ba2+, Cu2+, Zn2+, Hg2+, Cd2+, Co2+, Ni2+ or Fe3+ on the general and pitting corrosion of aluminium in neutral and acid media has been determined by gravimetric, potentiodynamic polarization and thermometric measurements together with surface analysis by XPS, Auger profile depth analysis and examination by SEM. Alkali and alkaline earth cations showed practically no effect. Transition and heavy metal cations caused initial inhibition at low concentrations. Above minimum concentrations strong acceleration of corrosion took place. This behaviour is interpreted on the basis of deposition of the metals by displacement which is not homogeneous on the surface of aluminium. Cd2+ ions showed efficient inhibition over a particularly wide concentration range which suggested its application as an inhibitor of aluminium corrosion. It inhibited the accelerating effect of Cu2+ and Fe3+ through hindering their deposition by displacement. Cadmium is incorporated into the oxide film that develops on the aluminium surface to form a mixed oxide with aluminium. This film would suppress the kinetics of the partial cathodic reaction leading to the observed corrosion inhibition.