In this paper we prove that if a complete noncompact manifold with nonnegative Ricci curvature and linear volume growth has a nonconstant harmonic function of at most polynomial growth, then the manifold splits isometrically.