Revealing the ultimate speed limit at which magnetic order can be controlled, is a fundamental challenge of modern magnetism having far reaching implications for magnetic recording industry. Exchange interaction is the strongest force in magnetism, being responsible for ferromagnetic or antiferromagnetic spin order. How do spins react after being optically perturbed on an ultrashort timescales pertinent to the characteristic time of the exchange interaction? Here we demonstrate that femtosecond measurements of X-ray magnetic circular dichroism provide revolutionary new insights into the problem of ultrafast magnetism. In particular, we show that upon femtosecond optical excitation the ultrafast spin reversal of Gd(FeCo) - a material with antiferromagnetic coupling of spins - occurs via a transient ferromagnetic state. The latter one emerges due to different dynamics of Gd and Fe magnetic moments: Gd switches within 1.5 ps while it takes only 300 fs for Fe. Thus, by using a single fs laser pulse one can force the spin system to evolve via an energetically unfavorable way and temporary switch from an antiferromagnetic to ferromagnetic type of ordering. These observations supported by atomistic simulations, present a novel concept of manipulating magnetic order on different classes of magnetic materials on timescales of the exchange interaction.