  We investigate the role of the luminous infrared galaxy (LIRG) and
ultra-luminous infrared galaxy (ULIRG) phases in the evolution of Ks-selected
galaxies and, in particular, Extremely Red Galaxies (ERGs). With this aim, we
compare the properties of a sample of 2905 Ks<21.5 (Vega mag) galaxies in the
GOODS/CDFS with the sub-sample of those 696 sources which are detected at 24
microns. We find that LIRGs constitute 30% of the galaxies with stellar mass
M>1x10^{11} Msun assembled at redshift z=0.5. A minimum of 65% of the galaxies
with M>2.5x10^{11} Msun at z~2-3 are ULIRGs at those redshifts. 60% of the
ULIRGs in our sample have the characteristic colours of ERGs. Conversely, 40%
of the ERGs with stellar mass M>1.3x10^{11} Msun at 1.5<z<2.0 and a minimum of
52% of those with the same mass cut at 2.0<z<3.0 are ULIRGs. The average
optical/near-IR properties of the massive ERGs at similar redshifts that are
identified with ULIRGs and that are not have basically no difference,
suggesting that both populations contain the same kind of objects in different
phases of their lives.
  LIRGs and ULIRGs have an important role in galaxy evolution and mass
assembly, and, although they are only able to trace a fraction of the massive
(M>1x10^{11} Msun) galaxies present in the Universe at a given time, this
fraction becomes very significant (>50%) at redshifts z>~2.
