Carbides of composition R2Fe17C(x) (x almost-equal-to 2; R = Y, Sm) are formed by reaction of a powder of the 2:17 parent alloy in a hydrocarbon gas (methane, acetylene, butane) at around 550-degrees-C. Unit cell volumes, and Curie temperatures are comparable to those of the corresponding nitrides, and they are substantially larger than the values found in carbides obtained from the melt.