We show that an affine-invariant code C of length pm is not permutation equivalent to a cyclic code except in the obvious cases: m = 1 or C is either {0}, the repetition code or its dual. Affine-invariant codes were firstly introduced by Kasami, Lin and Peterson [KLP2] as a generalization of Reed-Muller codes. This class of codes has received the attention of several authors because of its good algebraic and decoding properties [D, BCh, ChL, Ho, Hu]. It is well known that every affine-invariant code can be seen as an ideal of the group algebra of an elementary abelian group in which the group is identified with the standard base of the ambient space. In particular, if C is a code of prime length then C is permutation equivalent to a cyclic code. Other obvious affineinvariant cyclic codes are the trivial code, {0}, the repetition code and the code form by all the even-like words, provided its length is a prime power. In this paper we prove that these are the only affine-invariant code...