  We explore a mechanism for the formation of the first globular clusters,
operating during the assembly of dwarf galaxies at high redshifts, z > 10. The
substructure in the dark matter and the corresponding potential wells are
responsible for setting the cluster scale of ~10^5 M_sun. The second mass scale
in the formation problem, the stellar scale of ~1 M_sun, is determined in turn
by the processes that cool the gas. We address the origin of the first, cluster
scale by means of three-dimensional numerical simulations of the collapsing
dark matter and gaseous components. We find that the gas falls into the deepest
dark subhalos, resulting in a system of ~ 5 proto-globular clouds. The
incipient globular clusters lose their individual dark halos in the process of
violent relaxation, leading to the build-up of the general dark halo around the
dwarf galaxy.
