Magnetization measurements have been performed between 1.3 and 300 K in fields up to 50 × 105 A/m in the a, b, and c directions of hcp crystals of pure Y and Y doped with 0.14-at.% Dy or 0.14-at.% Er, using the Faraday method and a vibrating-sample method. The characteristic behavior of both the isothermal and isofield susceptibility curves could be interpreted in terms of a general single-ion anisotropy Hamiltonian and a molecular-field exchange model. In this way the following anisotropy parameters Anm〈rn〉, with (n, m)=(2, 0), (4, 0) (6, 0), and (6, 6) respectively, were obtained (in units of K): Er, -122±12, +18.3±1.8, +11.7±1.2, -135±13; Dy, -50.5±5, +49.5±5, +40.4±4, -321±32. The higher-order anisotropy parameters play an important part in determining the crystal-field-level scheme and they are incompatible with a model assuming that the charges giving rise to the crystal field are solely external to the magnetic ion. The exchange interactions differ by up to a factor of 15 for c and basal-plane directions.