  We prove a criteria for uniform hyperbolicity based on the periodic points of
the transformation. More precisely, if a mild (non uniform) hyperbolicity
condition holds for the periodic points of any diffeomorphism in a residual
subset of a $C^1$-open set $\SU$ then there exists an open and dense subset
$\SA\subset \SU$ of Axiom A diffeomorphisms. Moreover, we also prove a
noninvertible version of Ergodic Closing Lemma which we use to prove a
counterpart of this result for local diffeomorphisms. As a simple corollary of
our techniques, we have that an arbitrary $\mathrm{C}^1$-class local
diffeomorphism $f$ of a closed manifold $M^n$ is uniformly expanding on the
closure $\mathrm{Cl}_{M^n}(\mathrm{Per}(f))$ of its periodic point set
$\mathrm{Per}(f)$, if it is nonuniformly expanding on $\mathrm{Per}(f)$.
