The effects of irradiation with 17 MeV electron beams and Co-60 gamma-rays on the magnetic flux of Nd-Fe-B and Sm-Co permanent magnets have been studied. At an electron dose of 2.1 X 10(-3) C/cm(2) (at an absorbed dose of 2.6 MGy), the magnetic flux loss of Nd-Fe-B is 9%, while the flux loss of Sm-Co is below 0.4% at a dose of 1.4 x 10(-3) C/cm(2). After remagnetization of the irradiated Nd-Fe-B sample the magnetic flux almost recovers to the strength before irradiation. For gamma-ray irradiation of Nd-Fe-B and Sm-Co at an absorbed dose of 2.8 MGy, the flux loss is below 0.5%. Irradiation by gamma-rays is considered to be equivalent to that of electrons at energies below 0.8 MeV. The difference between the results for electron-beam and gamma-ray irradiation of Nd-Fe-B is discussed.