We have investigated the formation of dust in the ejecta of Type II supernovae (SNe), mostly of primordial composition, to answer the question of where the first solid particles are formed in the Universe. However, we have also considered non-zero progenitor metallicity values up to Z= Z⊙. The calculations are based on standard nucleation theory, and the scheme has been tested for the first time on the well-studied case of SN1987A, yielding results that are in agreement with the available data. We find that: (i) the first dust grains are predominantly made of silicates, amorphous carbon (AC), magnetite and corundum; and (ii) the largest grains are the AC ones, with sizes around 300 Å, whereas the other grain types have smaller radii, around 10–20 Å. The grain size distribution depends somewhat on the thermodynamics of the ejecta expansion, and variations in the results by a factor ≈2 might occur within reasonable estimates of the relevant parameters. Also, and for the same reason, the grain size distribution is essentially unaffected by metallicity changes. The predictions on the amount of dust formed are very robust: for Z=0, we find that SNe with masses in the range (12–35) M⊙ produce about 0.08 M⊙≲Md≲0.3 M⊙ of dust per supernova. The above range increases by roughly three times as the metallicity is increased to solar values. We discuss the implications and the cosmological consequences of the results.