  Let $G$ be a finite group, $p$ a prime, and suppose that every maximal
subgroup of $G$ is $p$-nilpotent or has prime index in $G$. We prove, relying
in the Classification of Finite Simple Groups, that if $p$ is odd and $p\neq
5$, then $G$ is $p$-solvable, and the $p$-length of $G$ is at most $2$. For
$p=5$, however, a group $G$ satisfying the same conditions need not be
$5$-solvable, and in that case we show that $G/S_5(G)\cong{\rm PSL}_2(11)$,
where $S_5(G)$ is the $5$-solvable radical of $G$. For $p=2$, groups satisfying
our conditions need not be solvable either. We prove, among other properties,
that a unique simple group of Lie type, which belongs to the family ${\rm
PSL}_2(r^{2^a})$ for certain values of the prime $r$, can be involved in the
structure of such groups.
