  The Birkhoff conjecture says that the boundary of a strictly convex
integrable billiard table is necessarily an ellipse. In this article, we
consider a stronger notion of integrability, namely, integrability close to the
boundary, and prove a local version of this conjecture: a small perturbation of
almost every ellipse that preserves integrability near the boundary, is itself
an ellipse. We apply this result to study local spectral rigidity of ellipses
using the connection between the wave trace of the Laplacian and the dynamics
near the boundary and establish rigidity for almost all of them.
