  An $\ell$-vertex-ranking of a graph $G$ is a colouring of the vertices of $G$
with integer colours so that in any connected subgraph $H$ of $G$ with diameter
at most $\ell$, there is a vertex in $H$ whose colour is larger than that of
every other vertex in $H$. The $\ell$-vertex-ranking number,
$\chi_{\ell-\mathrm{vr}}(G)$, of $G$ is the minimum integer $k$ such that $G$
has an $\ell$-vertex-ranking using $k$ colours. We prove that, for any fixed
$d$ and $\ell$, every $d$-degenerate $n$-vertex graph $G$ satisfies
$\chi_{\ell-\mathrm{vr}}(G)= O(n^{1-2/(\ell+1)}\log n)$ if $\ell$ is even and
$\chi_{\ell-\mathrm{vr}}(G)= O(n^{1-2/\ell}\log n)$ if $\ell$ is odd. The case
$\ell=2$ resolves (up to the $\log n$ factor) an open problem posed by
\citet{karpas.neiman.ea:on} and the cases $\ell\in\{2,3\}$ are asymptotically
optimal (up to the $\log n$ factor).
