It is investigated whether a massive Abelian vector field, whose gauge kinetic function is growing during inflation, can be responsible for the generation of the curvature perturbation in the Universe. Particle production is studied and it is shown that the vector field can obtain a scale-invariant superhorizon spectrum of perturbations with a reasonable choice of kinetic function. After inflation the vector field begins coherent oscillations, during which it corresponds to pressureless isotropic matter. When the vector field dominates the Universe, its perturbations give rise to the observed curvature perturbation following the curvaton scenario. It is found that this is possible if, after the end of inflation, the mass of the vector field increases at a phase transition at temperature of order 1 TeV or lower. Inhomogeneous reheating, whereby the vector field modulates the decay rate of the inflaton, is also studied.