  Despite more than three decades of tireless efforts, the nature of
high-temperature superconductivity (HTS) remains a mystery. A recently proposed
long-distance effective field theory, accounting for all the universal features
of HTS and the equally mysterious pseudogap phase, related them to the
coexistence of a charge condensate with a condensate of dyons, particles
carrying both magnetic and electric charges. Central to this picture are
magnetic monopoles emerging in the proximity of the topological quantum
superconductor-insulator transition (SIT) that dominates the HTS phase diagram.
However, the mechanism responsible for spatially localized electron pairing,
characteristic of HTS, remains a puzzle. Here we show that real-space,
localized electron pairing is mediated by magnetic monopoles and occurs at
temperatures well above the superconducting transition temperature $T_{\mathrm
c}$. Localized electron pairing promotes the formation of superconducting
granules connected by Josephson links. Global superconductivity sets in when
these granules form an infinite cluster at $T_{\mathrm c}$ which is estimated
to fall in the range from hundred to thousand Kelvins. Our findings pave the
way to tailoring materials with elevated superconducting transition
temperatures.
