  HD molecules can be an important cooling agent of the primordial gas behind
the shock waves originated through mergings of the dark matter haloes at epochs
when first luminous objects were to form. We study the necessary conditions for
the HD cooling to switch on in the low temperature range $T<200$ K. We show
that these conditions are fulfiled in merging haloes with the total (dark
matter and baryon) mass in excess of $M_{\rm cr}\sim 10^7[(1+z)/20]^{-2}\msun$.
Haloes with masses $M>M_{\rm cr}$ may be the sites of low-mass star formation.
