A novel hard magnetic compound series with composition Sm2Fe14Ga3Cx (X=0, 0.5, 1.0, 1.5, 2.0, and 2.5) was prepared by arc melting. The carbides crystallize in the rhombohedral Th2Zn17-type structure and are single phase except for Sm2Fe14Ga3 and Sm2Fe14Ga3C0.5 which contain some amounts of alpha-Fe. The substitution of Ga is found to play an important role in the stability of high carbon rare-earth iron compounds with 2:17-type structure. The Curie temperatures of Sm2Fe14Ga3Cx are 200-240 K higher than that of Sm2Fe17. All compounds with x=0-2.5 exhibit an easy c-axis anisotropy at room temperature. The anisotropy fields increase with increasing carbon concentration from 70 kOe for x=0 to at least 90 kOe for x greater-than-or-equal-to 1.5. A room-temperature coercivity of 15 kOe is obtained in Sm2Fe14Ga3C1.5 prepared by melt spinning at a speed of 30 m/s.