We studied the structural and magnetic properties of Fe0.8C0.2 thin films deposited by cosputtering of Fe and C targets in a direct current magnetron sputtering (dcMS) process at a substrate temperature (Ts) of 300, 523 and 773 K. The structure and morphology was measured using x-ray diffraction (XRD), x-ray absorption near edge spectroscopy (XANES) at Fe L and C K-edges and atomic/magnetic force microscopy (AFM, MFM), respectively. An ultrathin (3 nm) 57 Fe0.8C0.2 layer, placed between relatively thick Fe0.8C0.2 layers was used to estimate Fe selfdiffusion taking place during growth at different Ts using depth profiling measurements. Such 57 Fe0.8C0.2 layer was also used for 57 Fe conversion electron Mössbauer spectroscopy (CEMS) and nuclear resonance scattering (NRS) measurements, yielding the magnetic structure of this ultrathin layer. We found from XRD measurements that the structure formed at low Ts (300 K) is analogous to Fe-based amorphous alloy and at high Ts (773 K), pre-dominantly a Fe3C phase has been formed. Interestingly, at an intermediate Ts (523 K), a clear presence of Fe4C (along with Fe3C and Fe) can be seen from the NRS spectra. The microstructure obtained from AFM images was found to be in agreement with XRD results. MFM images also agrees well with NRS results as the presence of multi-magnetic components can be clearly seen in the sample grown at Ts = 523 K. The information about the hybridization between Fe and C, obtained from Fe L and C K-edges XANES also supports the results obtained from other measurements. In essence, from this work, experimental realization of Fe4C has been demonstrated. It can be anticipated that by further fine-tuning the deposition conditions, even single phase Fe4C phase can be realized which hitherto remains an experimental challenge.