  Let $G$ be a connected graph on $n$ vertices, and let $D(G)$ be the distance
matrix of $G$. Let $\partial_1(G)\ge\partial_2(G)\ge\cdots\ge\partial_n(G)$
denote the eigenvalues of $D(G)$. In this paper, we characterize all connected
graphs with $\partial_{3}(G)\leq -1$ and $\partial_{n-1}(G)\geq -2$. By the
way, we determine all connected graphs with at most three distance eigenvalues
different from $-1$ and $-2$.
