The aggregation of interstellar grains as a result of ballistic collisions produces loosely packed structures with much of their internal volume composed by vacuum (cavities). The molecular material present on the surfaces of the cavities gives rise to a series of reactions induced by cosmic rays, UV radiation, thermal shocks, etc., in high reducing conditions. Thus, a terrestrial type chemistry is given the possibility to evolve inside these cavities. The resulting products are different and of a wider range than those from gas-phase or surface chemistry in molecular clouds. Under conditions similar to those in the aggregate cavities, laboratory experiments have produced amino acids, sugars and other organic compounds from simple precursors. In dense star-forming regions, the molecular species inside aggregates are efficiently shielded against the local UV field. The same molecules were incorporated in the material which formed the Earth, as well as other planets, during the process of its formation and afterwards fell on the surface via comets, meteorites, interstellar dust, etc. This was the source material that can produce, under favorable circumstances, the biopolymers needed for life. The astronomical observations of organic molecules in star-forming regions and the results of analyses of meteorites and cometary dust seem to support the present hypothesis that complex prebiotic molecules form inside dust aggregates and therein survive the journey to planetary systems. The Miller experiment is revisited through innumerable repetitions inside dust grain aggregates.