  We present a physical model for the coevolution of massive spheroidal
galaxies and active nuclei at their centers. Supernova heating is increasingly
effective in slowing down the star formation and in driving gas outflows in
smaller and smaller dark matter halos. Thus the more massive protogalaxies
virializing at early times are the sites of faster star formation. The
correspondingly higher radiation drag causes a faster angular momentum loss by
the gas and induces a larger accretion rate onto the central black hole. In
turn, the kinetic energy of the outflows powered by the active nuclei can
unbind the residual gas in a time shorter for larger halos. The model accounts
for a broad variety of dynamical, photometric and metallicity properties of
early-type galaxies, for the M_BH -- \sigma relation and for the local
supermassive black-hole mass function.
