We have studied the influence of Co and Ni doping on the electronic band structure and the transport properties of high-temperature superconductors. The doping has dramatic effects on both the normal and the superconducting state. Upon doping the residual resistivity increases strongly. For sufficiently high Co concentration the temperature dependence rho(T) turns from a simple linear dependence to one displaying a minimum around T-min = 190 K. This minimum is followed by an upturn (d rho/dT<0) and by a transition to a superconducting state at even lower temperature (T-c = 66 K. These changes in the resistivity are accompanied by an almost complete disappearance of the dispersing bandlike states in angle-resolved photoemission. We show that spatial localization of the carrier states through the doping-induced disorder provides a consistent explanation of the experimental results. However, none of the standard scattering mechanisms can explain the observed localization. Because the increase in the residual resistivity is higher than the unitary limit, the localization has to be through a cooperative effect. This rules out standard Abrikosov-Gor'kov or Kondo effects. We discuss the observed coexistence of localization and superconductivity in terms of the relevant length scales and compare it to theoretical predictions.