Abstract: The recent realization that Sweet-Parker current sheets are violently unstable to the secondary tearing (plasmoid) instability implies that such current sheets cannot occur in real systems. This suggests that, in order to understand the onset of magnetic reconnection, one needs to consider the growth of the tearing instability in a current layer as it is being formed. We present such an analysis in the context of nonlinear resistive MHD for a generic time-dependent equilibrium representing a gradually forming current sheet. It is shown that two onset regimes, single-island and multi-island, are possible, depending on the rate of current sheet formation. A simple model is used to compute the criterion for transition between these two regimes, as well as the reconnection onset time and the current sheet parameters at that moment. For typical solar corona parameters this model yields results consistent with observations.