The 2p photoabsorption and photoelectron spectra of atomic Fe and molecular FeCl2 were studied by photoion and photoelectron spectroscopy using monochromatized synchrotron radiation and atomic or molecular beam technique. The atomic spectra were analyzed with configuration interaction calculations yielding excellent agreement between experiment and theory. For the analysis of the molecular photoelectron spectrum which shows pronounced interatomic effects, a charge transfer model was used, introducing an additional 3d(7) configuration. The resulting good agreement between the experimental and theoretical spectrum and the remarkable similarity of the molecular with the corresponding spectrum in the solid phase opens a way to a better understanding of the interplay of the interatomic and intra-atomic interactions in the 2p core level spectra of the 3d metal compounds.