We prove that if a finite group G of rank r admits an automorphism I� of prime order having exactly m fixed points, then G has a I�-invariant subgroup of (r,m)-bounded index which is nilpotent of r-bounded class (Theorem 1). Thus, for automorphisms of prime order the previous results of Shalev, Khukhro, and Jaikin-Zapirain are strengthened. The proof rests, in particular, on a result about regular automorphisms of Lie rings (Theorem 3). The general case reduces modulo available results to the case of finite p-groups. For reduction to Lie rings powerful p-groups are also used. For them a useful fact is proved which allows us to "glue together" nilpotency classes of factors of certain normal series (Theorem 2).