We define nef line bundles ${\mathcal L}_r$ on a projective variety X with the property that, for a curve $C \subset X$, the intersection ${\mathcal L}_r.C$ is zero, if and only if the restriction morphism ${\rm Hom}(\pi_1(X),{\rm U}(r)) \to {\rm Hom}(\pi_1(C),{\rm U}(r))$ has finite image up to conjugation. This yields a rational morphism $\smash[b]{\xymatrix{X \ar@{-->}[r]^-{{\rm alb}_r} & {\rm Alb}_r(X)}}$ contracting those curves C with ${\mathcal L}_r.C=0$. For $r=1$ this is the Stein factorization of the Albanese morphism.