The impact of kiloelectronvolt ${\mathrm{He}}^{+}$ and kiloelectronvolt ${\mathrm{Ne}}^{+}$ ion irradiation on the magnetic properties of rare earth-3$d$ transition metal amorphous alloys was investigated. The studies were performed for 20-nm-thick ${\mathrm{Gd}}_{x}{\mathrm{Fe}}_{100\ensuremath{-}x}$ and ${\mathrm{Tb}}_{x}{\mathrm{Fe}}_{100\ensuremath{-}x}$ films with perpendicular magnetic anisotropy, irradiated with doses ranging from $5\ifmmode\times\else\texttimes\fi{}{10}^{13}$ to $5\ifmmode\times\else\texttimes\fi{}{10}^{15}\phantom{\rule{0.16em}{0ex}}\mathrm{ions}\phantom{\rule{0.16em}{0ex}}\mathrm{per}\phantom{\rule{0.16em}{0ex}}\mathrm{c}{\mathrm{m}}^{2}$. We demonstrate that this approach can be used to engineer magnetic properties such as magnetization, magnetic anisotropy, and compensation temperature in both alloys and to control the spin-flop reorientation transition in GdFe. We find that fine-tuning of the compensation point is possible without losing perpendicular magnetic anisotropy by appropriate selection of ion energy and irradiation dose. The experiments were supported by atomistic simulations revealing that the observed changes can be attributed to selective oxidation of rare earth atoms. Oxidation of 1% of atoms in the lattice gives reasonable agreement to the experimental results for low and medium ion doses.