  We present estimated redshifts and derived properties for a sample of 1663
galaxies with Ks <= 22 (Vega), selected from 50.4 sq.arcmin of the GOODS/CDFS
field with deep ISAAC imaging, and make an extensive comparison of their
properties with those of the extremely red galaxies (ERGs) selected in the same
field. We study in detail the evolution of Ks-selected galaxies up to redshifts
z ~ 4 and clarify the role of ERGs within the total Ks-band galaxy population.
We compute the total Ks-band luminosity function (LF) and compare its evolution
with the ERG LF. Up to <z_phot>=2.5, the bright end of the Ks-band LF shows no
sign of decline, and is progressively well reproduced by the ERGs with
increasing redshift. We also explore the evolution of massive systems present
in our sample: up to 20%-25% of the population of local galaxies with assembled
stellar mass M>1x10^11 Msun has been formed before redshift z ~ 4, and contains
  ~ 45% to 70% of the stellar mass density of the Universe at that redshift.
Within our sample, the comoving number density of these massive systems is then
essentially constant down to redshift z ~ 1.5, by which point most of them have
apparently evolved into (I-Ks)-selected ERGs. The remaining massive systems
observed in the local Universe are assembled later, at redshifts z <= 1.5. Our
results therefore suggest a two-fold assembly history for massive galaxies, in
which galaxy/star formation proceeds very efficiently in high mass haloes at
very high redshift.
