We consider the adjacency matrix A of the Erdős--Rényi graph on N vertices with edge probability d/N. For (\log \log N)^4 \ll d \lesssim \log N, we prove that the eigenvalues near the spectral edge form asymptotically a Poisson process and the associated eigenvectors are exponentially localized. As a corollary, at the critical scale d \asymp \log N, the limiting distribution of the largest nontrivial eigenvalue does not match with any previously known distribution. Together with [arXiv:2005.14180], our result establishes the coexistence of a fully delocalized phase and a fully localized phase in the spectrum of A. The proof relies on a three-scale rigidity argument, which characterizes the fluctuations of the eigenvalues in terms of the fluctuations of sizes of spheres of radius 1 and 2 around vertices of large degree.