We study various properties of the Frobenius map φ(x)=xp on a noncommutative algebra R over a field F of positive characteristic p. We call R perfect whenever φ is surjective. More generally, we say that R is additively (respectively, multiplicatively) p-power-closed if, for every x,y∈R, there exists a positive integer n such that xpn+ypn (respectively, xpnypn) is a p-power in R. If, for example, φn were a ring homomorphism (as when R is commutative), then R would be additively and multiplicatively p-power-closed. We show that a finite-dimensional unital algebra R is Lie nilpotent if and only if R is additively (respectively, multiplicatively) p-power-closed and each of its simple homomorphic images has Schur index 1. Since not all finite-dimensional perfect division algebras are Lie nilpotent, the Schur index condition cannot be omitted. We deduce that similar results hold for the class of all finitely generated PI-algebras. Moreover, for this same class, we give a positive solution to the following problem reminiscent of the problems of Kurosh and Levitzki: is every finitely generated perfect algebra finite-dimensional?