Let and denote respectively the variety of groups of exponent dividing e, the variety of nilpotent groups of class at most c, the class of nilpotent groups and the class of finite groups. It follows from a result due to Kargapolov and Čurkin and independently to Groves that in a variety not containing all metabelian groups, each polycyclic group G belongs to . We show that G is in fact in , where c is an integer depending only on the variety. On the other hand, it is not always possible to find an integer e (depending only on the variety) such that G belongs to but we characterize the varieties in which that is possible. In this case, there exists a function f such that, if G is d-generated, then G ∈ So, when e = 1, we obtain an extension of Zel'manov's result about the restricted Burnside problem (as one might expect, this result is used in our proof). Finally, we show that the class of locally nilpotent groups of a variety forms a variety if and only if for some integers c′, e′.