Starting from a t-J model, we introduce inhomogeneous terms to mimic stripes. We find that if the inhomogeneous terms break the SU(2) spin symmetry the binding between holes is tremendously enhanced in the thermodynamic limit. In any other model (including homogeneous models) the binding in the thermodynamic limit is small or neglible. By including these inhomogeneous terms we can reproduce experimental neutron scattering data. We also discuss the connection of the resulting inhomogeneity-induced superconductivity to recent experimental evidence for a linear relation between magnetic incommensurability and the superconducting transition temperature, as a function of doping.