We investigate theoretically the nucleation of superconductivity in a thin film pierced by ferromagnetic dots. We demonstrate that localized superconductivity near the ferromagnet/superconductor interface is sustained above the second critical field H c2 in spite of the deleterious proximity effect of the ferromagnet. This phase is characterized by Little-Parks oscillations similar to those found in perforated films, where surface superconductivity is stabilized by the enhanced properties of the superconductor-vacuum boundary. Here, localization is provided by field compensation induced by the ferromagnet stray field near the ferromagnetic dot. We also show that for an array of such ferromagnetic dots the localized phase around each dot actually percolates through the entire sample, rendering bulk superconductivity at fields considerably higher than H c2 .