In this study we report on the film growth and characterization of thin ͑approximately 50-nm-thick͒ Ti-Fe-C films deposited on amorphous quartz. The experimental studies have been complemented by first-principles density-functional theory ͑DFT͒ calculations. Upon annealing of as-prepared films, the composition of the metastable Ti-Fe-C film changes. With increasing annealing time, there is a depletion of iron close to the surface of the film, while regions enriched in iron are simultaneously formed deeper into the film. Both the magnetic ordering temperature and the saturation magnetization changes significantly upon annealing. The DFT calculations show that the critical temperature and the magnetic moment both increase with increasing Fe and C-vacancy concentration. The formation of the metastable iron-rich Ti-Fe-C compound is reflected in the strong increase in the magnetic ordering temperature. Eventually, after enough annealing time ͑Ն10 min͒, nanocrystalline ␣-Fe starts to precipitate, the amount and size of which can be controlled by the annealing procedure; after 20 min of annealing, the experimental results indicate a nanocrystalline iron-film embedded in a wear-resistant TiC compound. This conclusion is further supported by transmission electron microscopy studies on epitaxial Ti-Fe-C films deposited on single-crystalline MgO substrates where, upon annealing, an iron film embedded in TiC is formed. Our results suggest that annealing of metastable Ti-Fe-C films can be used as an efficient way of creating a wear-resistant magnetic thin film material.