With detailed experimental studies and hydrodynamics and particle-in-cell simulations we investigate the role of the prepulse in laser proton acceleration. The prepulse or pedestal (amplified spontaneous emission) can completely evaporate the irradiated region of a sufficiently thin foil; therefore, the main part of the laser pulse interacts with an underdense plasma. The multiparametric particle-in-cell simulations demonstrate that the main pulse generates the quasistatic magnetic field, which in its turn produces the long-lived charge separation electrostatic field, accelerating the ions.