  Using an ultrashort laser pulse we explore {\it ab-initio} the spin dynamics
of Gd$_x$(FeCo)$_{1-x}$ at femtosecond time scales. Optical excitations are
found to drive charge from Fe majority $d$-states to the unoccupied Gd
$f$-minority states, with $f$-electron character excited occupation lagging
behind that of the $d$-electron character, leading to substantial
demagnetisation of both species while leaving the global moment almost
unchanged. For $x > 0.33$ this results in the creation of an ultrafast
ferromagnetic (FM) transient by the end of the laser pulse, with the Gd
demagnetization rate slower than that of Fe. For all concentrations the Gd
moments begin to rotate from their ground state orientations developing
in-plane moments of between 0.2-0.5~$\mu_B$. Thus, the ultrafast spin dynamics
of the material captures three important ingredients of the all optical
switching that occurs at much later (picosecond) times: (i) the development of
a FM transient, (ii) the different rates of demagnetisation of Fe and Gd and,
(iii), the breaking of the colinear symmetry of the ground state. Furthermore,
several predictions are made about the behaviour of Fe-Gd alloys that can be
experimentally tested and can lead to a spin-filtering device.
