In the $q$-voter model, the voter at $x$ changes its opinion at rate $f_x^q$, where $f_x$ is the fraction of neighbors with the opposite opinion. Mean-field calculations suggest that there should be coexistence between opinions if $q<1$ and clustering if $q>1$. This model has been extensively studied by physicists, but we do not know of any rigorous results. In this paper, we use the machinery of voter model perturbations to show that the conjectured behavior holds for $q$ close to 1. More precisely, we show that if $q<1$, then for any $m<infty$ the process on the three-dimensional torus with $n$ points survives for time $n^m$, and after an initial transient phase has a density that it is always close to 1/2. If $q>1$, then the process rapidly reaches fixation on one opinion. It is interesting to note that in the second case the limiting ODE (on its sped up time scale) reaches 0 at time $log n$ but the stochastic process on the same time scale dies out at time $(1/3)log n$.