  The {\it prime graph} $\Gamma(G)$ of a finite group $G$ is the graph whose
vertex set is the set of prime divisors of $|G|$ and in which two distinct
vertices $r$ and $s$ are adjacent if and only if there exists an element of $G$
of order $rs$. Let $A_n$ ($S_n$) denote the alternating (symmetric) group of
degree $n$. We prove that if $G$ is a finite group with $\Gamma(G)=\Gamma(A_n)$
or $\Gamma(G)=\Gamma(S_n)$, where $n\geq19$, then there exists a normal
subgroup $K$ of $G$ and an integer $t$ such that $A_t\leq G/K\leq S_t$ and
$|K|$ is divisible by at most one prime greater than $n/2$.
