The151Sm(n,gamma)152Sm cross section has been measured at the spallation neutron facility n_TOF at CERN in the energy range from 1 eV to 1 MeV. The new facility combines excellent resolution in neutron time-of-flight, low repetition rates, and an unsurpassed instantaneous luminosity, resulting in rather favorable signal/background ratios. The 151Sm cross section is of importance for characterizing neutron capture nucleosynthesis in asymptotic giant branch stars. At a thermal energy of kT=30 keV the Maxwellian averaged cross section of this unstable isotope (t(1/2)=93 yr) was determined to be 3100+/-160 mb, significantly larger than theoretical predictions.