We present observations of GRB 060124, the first event for which both the prompt and the afterglow emission could be observed simultaneously and in their entirety by the three Swift instruments. Indeed, Swift-BAT triggered on a precursor ∼570 s before the main burst peak, and this allowed Swift to repoint the narrow field instruments to the burst position ∼350 s before the main burst occurred. GRB 060124 also triggered Konus-Wind, which observed the prompt emission in a harder gamma-ray band (up to 2 MeV). Thanks to these exceptional circumstances, the temporal and spectral properties of the prompt emission can be studied in the optical, X-ray and gamma-ray ranges. While the X-ray emission (0.2-10 keV) clearly tracks the gamma-ray burst, the optical component follows a different pattern, likely indicating a different origin, possibly the onset of external shocks. The prompt GRB spectrum shows significant spectral evolution, with both the peak energy and the spectral index varying. As observed in several long GRBs, significant lags are measured between the hard-and low-energy components, showing that this behaviour extends over 3 decades in energy. The GRB peaks are also much broader at soft energies. This is related to the temporal evolution of the spectrum, and can be accounted for by assuming that the electron spectral index softened with time. The burst energy (E iso ∼ 5 × 10 53 erg) and average peak energy (E p ∼ 300 keV) make GRB 060124 consistent with the Amati relation. The X-ray afterglow is characterized by a decay which presents a break at t b ∼ 10 5 s.