Recent X-ray observations of intense high-speed outflows in quasars suggest that supercritical accretion on to the central black hole may have an important effect on a host galaxy. I revisit some ideas of Silk and Rees, and assume such flows occur in the final stages of building up the black hole mass. It is now possible to model explicitly the interaction between the outflow and the host galaxy. This is found to resemble a momentum-driven stellar wind bubble, implying a relation M_BH = (f_g kappa/2 pi G^2) sigma^4 = 1.5 10^8 sigma_200^4 Msun between black hole mass and bulge velocity dispersion (f_g = gas fraction of total matter density, kappa = electron scattering opacity), without free parameters. This is remarkably close to the observed relation in both slope and normalization. This result suggests that the central black holes in galaxies gain most of their mass in phases of super-Eddington accretion, which are presumably obscured or at high redshift. Observed super-Eddington quasars are apparently late in growing their black hole masses.