High coercivity film samples of the ordered Sm2Fe17Nx phase with intrinsic coercivities, iHc, up to 23 kOe at 293 K, and 35 kOe at 10 K, were synthesized by rf sputtering. Random orientation Sm2Fe17 films were formed by the subsequent crystallization of originally amorphous deposits. The iHc of the original Sm2Fe17 films was 0.75 kOe at 293 K. X-ray diffractometer traces from 2Θ=28° to 73°, CuKα, exhibited 14 lines. Before nitriding all 14 lines were fit to the 2-17 rhombohedral structure with a=8.555 Å, c=12.445 Å, with a weighted root-mean-square deviation in 2Θ of 0.01°. After nitriding the cell volume increase was ≊7%. Nitriding of the ordered 2-17 films had to be performed in a very narrow temperature range to optimize the magnetic properties. The best magnetic properties were obtained by crystallizing the amorphous deposits in situ at a temperature of ≊900 K for 1 h and then subsequently nitriding in N2 gas at 0.75 atm., at 675-725 K, for 2 h. The room temperature coercivity as a function of the Sm concentration reached a maximum value of ≊23 kOe at a slightly richer than stoichiometric Sm composition.