  We prove a $C^\infty$ closing lemma for Hamiltonian diffeomorphisms of closed
surfaces. This is a consequence of a $C^\infty$ closing lemma for Reeb flows on
closed contact three-manifolds, which was recently proved as an application of
spectral invariants in embedded contact homology. A key new ingredient of this
paper is an analysis of an area-preserving map near its fixed point, which is
based on some classical results in Hamiltonian dynamics: existence of KAM
invariant circles for elliptic fixed points, and convergence of the Birkhoff
normal form for hyperbolic fixed points.
