If a prime natural number $p\neq 3$ divides $a^3-3a+1$ for some integer $a$, then $p\equiv \pm1\pmod{9}$. 
$\textbf{Problem:}$  Let $a$ be a positive integer and $p$ a prime divisor of $a^3-3a+1$, with $p \neq 3$. Prove that $p$ is of the form $9k+1$ or $9k-1$, where $k$ is an integer.

I tried to complete the cube which didn't turn out to be anything good.  If the condition asked for $p$ to be only of the form $9k+1$, I would try to show that $a$ has order $9 \pmod{p}$.  But the given condition seems somewhat odd to me.
So, overall I could hardly make any real progress.
Any kind of hint or solutions are appreciated.

Without all details: If $\zeta$ is a primitive $9$th root of unity then $x^3-3x+1$ is the minimal polynomial of $\alpha = \zeta + \zeta^{-1}$. So if $x^3-3x+1$ has a root $\beta \pmod p$ for some prime then $\mathbb F_{p^2}$ has a root of $x^2-\beta x+1$ and if $p \neq 3$ then that root is a primitive $9$th root of unity. That implies that $9 \mid p^2-1$ since $\lvert \mathbb F_{p^2}^{\ast} \rvert = p^2-1$.
