  We show that a K-approximate subgroup A of a residually nilpotent group G is
contained in boundedly many cosets of a finite-by-nilpotent subgroup, the
nilpotent factor of which is of bounded step. Combined with an earlier result
of the author, this implies that A is contained in boundedly many translates of
a coset nilprogression of bounded rank and step. The bounds are effective and
depend only on K; in particular, if G is nilpotent they do not depend on the
step of G. As an application we show that there is some absolute constant c
such that if G is a residually nilpotent group, and if there is an integer n >
1 such that the ball of radius n in some Cayley graph of G has cardinality
bounded by n^(c log log n), then G is virtually (log n)-step nilpotent.
