The realization of high-transition-temperature (high-Tc) superconductivity confined to nanometre-sized interfaces has been a long-standing goal because of potential applications1, 2 and the opportunity to study quantum phenomena in reduced dimensions3, 4. This has been, however, a challenging target: in conventional metals, the high electron density restricts interface effects (such as carrier depletion or accumulation) to a region much narrower than the coherence length, which is the scale necessary for superconductivity to occur. By contrast, in copper oxides the carrier density is low whereas Tc is high and the coherence length very short, which provides an opportunity—but at a price: the interface must be atomically perfect. Here we report superconductivity in bilayers consisting of an insulator (La2CuO4) and a metal (La1.55Sr0.45CuO4), neither of which is superconducting in isolation. In these bilayers, Tc is either 15 K or 30 K, depending on the layering sequence. This highly robust phenomenon is confined within 2–3 nm of the interface. If such a bilayer is exposed to ozone, Tc exceeds 50 K, and this enhanced superconductivity is also shown to originate from an interface layer about 1–2 unit cells thick. Enhancement of Tc in bilayer systems was observed previously5 but the essential role of the interface was not recognized at the time.