Formation and magnetic properties of the interstitial Th2Zn17-type nitrides were investigated over the whole concentration range for Sm2(Fe1-xCox)17. The decomposition temperature, T(d), and the nitrogenation kinetics decrease with increasing Co content x. The substitution of Co for Fe, for x < 0.2, leads to an overall improvement of the intrinsic magnetic PropertieS Of Sm2Fe17Ny. The Curie temperature, the room temperature saturation polarization and the anisotropy field show a maximum in dependence on composition for x = 0.5 (T(C) = 901 K), x = 0.15 (J(s) = 1.55 T) and x = 0.3 (H(A) = 25.0 T), respectively. For Sm2Co17, nitrogenation considerably decreases the Curie temperature and the saturation polarization whereas the anisotropy field is almost doubled. For x = 0.2 the compound has excellent intrinsic magnetic properties for hard magnetic applications: T(C) = 842 K, J(s) = 1.55 T and H(A) = 23.7 T at room temperature.