Formaldehyde pretreated Pinus pinaster bark was used to sorb Cd 2+ and Hg 2+ from aqueous solutions. The sorption kinetics showed hyperbolic dependence of the proportion of cation adsorbed on time, and the sorption isotherms were satisfactorily fitted by Freundlich equations, with k and n values showing Hg 2+ to be more efficiently sorbed than Cd 2+. Except for low cation concentrations, for which sorption was practically total at all initial pH⩾6, sorption increased in this range, in keeping with a mechanism based on ion exchange with the hydroxyl protons of ring B of the procyanidin units of the tannins in the bark.