  We test the hypothesis that globular clusters form in supergiant molecular
clouds within high-redshift galaxies. Numerical simulations demonstrate that
such large, dense, and cold gas clouds assemble naturally in current
hierarchical models of galaxy formation. These clouds are enriched with heavy
elements from earlier stars and could produce star clusters in a similar way to
nearby molecular clouds. The masses and sizes of the model clusters are in
excellent agreement with the observations of young massive clusters. Do these
model clusters evolve into globular clusters that we see in our and external
galaxies? In order to study their dynamical evolution, we calculate the orbits
of model clusters using the outputs of the cosmological simulation of a Milky
Way-sized galaxy. We find that at present the orbits are isotropic in the inner
50 kpc of the Galaxy and preferentially radial at larger distances. All
clusters located outside 10 kpc from the center formed in the now-disrupted
satellite galaxies. The spatial distribution of model clusters is spheroidal,
with a power-law density profile consistent with observations. The combination
of two-body scattering, tidal shocks, and stellar evolution results in the
evolution of the cluster mass function from an initial power law to the
observed log-normal distribution. However, not all initial conditions and not
all evolution scenarios are consistent with the observed mass function.
