In this paper, we completely characterize the graphs with third largest distance eigenvalue at most $-1$ and smallest distance eigenvalue at least $-3$. In particular, we determine all graphs whose distance matrices have exactly two eigenvalues (counting multiplicity) different from $-1$ and $-3$. It turns out that such graphs consist of three infinite classes, and all of them are determined by their distance spectra. We also show that the friendship graph is determined by its distance spectrum.
Supplementary notes can be added here, including code, math, and images.