Local perturbations of the crystal and magnetic structure of gamma-iron near carbon interstitial impurity is investigated by ab initio electronic structure calculations. It is shown that the carbon impurity creates locally a region of ferromagnetic ordering with substantial tetragonal distortions. Exchange integrals and solution enthalpy are calculated, the latter being in very good agreement with experimental data. The effect of the local distortions on the carbon-carbon interactions in gamma-iron is discussed.