  Let $g$ be an element of a finite group $G$. For a positive integer $n$, let
$E_n(g)$ be the subgroup generated by all commutators $[...[[x,g],g],\dots,g]$
over $x\in G$, where $g$ is repeated $n$ times. By Baer's theorem, if
$E_n(g)=1$, then $g$ belongs to the Fitting subgroup $F(G)$. We generalize this
theorem in terms of certain length parameters of $E_n(g)$. For soluble $G$ we
prove that if, for some $n$, the Fitting height of $E_n(g)$ is equal to $k$,
then $g$ belongs to the $(k+1)$th Fitting subgroup $F_{k+1}(G)$. For nonsoluble
$G$ the results are in terms of nonsoluble length and generalized Fitting
height. The generalized Fitting height $h^*(H)$ of a finite group $H$ is the
least number $h$ such that $F^*_h(H)=H$, where $F^*_0(H)=1$, and $F^*_{i+1}(H)$
is the inverse image of the generalized Fitting subgroup $F^*(H/F^*_{i}(H))$.
Let $m$ be the number of prime factors of $|g|$ counting multiplicities. It is
proved that if, for some $n$, the generalized Fitting height of $E_n(g)$ is
equal to $k$, then $g$ belongs to $F^*_{f(k,m)}(G)$, where $f(k,m)$ depends
only on $k$ and $m$. The nonsoluble length $\lambda (H)$ of a finite group $H$
is defined as the minimum number of nonsoluble factors in a normal series each
of whose factors either is soluble or is a direct product of nonabelian simple
groups. It is proved that if $\lambda (E_n(g))=k$, then $g$ belongs to a normal
subgroup whose nonsoluble length is bounded in terms of $k$ and $m$. We also
state conjectures of stronger results independent of $m$ and show that these
conjectures reduce to a certain question about automorphisms of direct products
of finite simple groups.
