We have investigated the turbulent mean-field dynamo action in protoneutron stars that are subject to convective and neutron finger instabilities during the early evolutionary phase . While the first one develops mostly in the inner regions of the star , the second one is favored in the outer regions , where the Rossby number is much smaller and a mean-field dynamo action is more efficient . By solving the mean-field induction equation we have computed the critical spin period below which no dynamo action is possible and found it to be \sim 1 s for a wide range of stellar models and for both axisymmetric and non-axisymmetric magnetic fields . Because this critical period is substantially longer than the characteristic spin period of very young pulsars , we expect that a mean-field dynamo will be effective for most protoneutron stars . The saturation dipole field estimated by making use of the model of “ global ” quenching fits well the pulsar magnetic fields inferred from the spin-down data . Apart from the large scale magnetic field , our model predicts also a generation of small scale fields which are typically stronger than the poloidal field and can survive during the lifetime of pulsars . Extremely rapidly rotating protoneutron stars ( P \sim 1 ms ) may have the dipole field \sim ( 3 - 6 ) \times 10 ^ { 14 } G .