We present a light-storage experiment in a praseodymium-doped crystal where the light is mapped onto an inhomogeneously broadened optical transition shaped into an atomic frequency comb. After absorption of the light the optical excitation is converted into a spin-wave excitation by a control pulse. A second control pulse reads the memory (on-demand) by reconverting the spin-wave excitation to an optical one, where the comb structure causes a photon-echo type rephasing of the dipole moments and directional retrieval of the light. This combination of photon echo and spin-wave storage allows us to store sub-microsecond (450ns) pulses for up to 20 µs. The scheme has a high potential for storing multiple temporal modes in the single photon regime, which is an important resource for future long-distance quantum communication based on quantum repeaters.A quantum memory (QM) for photons is a light-matter interface that can achieve a coherent and reversible transfer of quantum information between a light field and a material system [1]. A QM should enable efficient, highfidelity storage of non-classical states of light, which is a key resource for future quantum networks, particularly in quantum repeaters [2][3][4][5][6] that have the potential for distributing entangled states over long distances for quantum communication tasks. In order to achieve reasonable entanglement distribution rates, it has been shown that some type of multiplexing is required [4,5], using for instance independent frequency, spatial or temporal modes (multimode QM).Several types of light-matter interactions have been proposed for building a QM, for instance electromagnetically induced transparency [7][8][9][10], Raman interactions [11][12][13][14], or photon-echo techniques [15][16][17][18][19][20][21][22]. Photon echo techniques in rare-earth-ion doped crystals have an especially high multimode capacity for storing classical light [23]. Classical photon echoes are not useful, however, for single-photon storage due to inherent noise problems due to unwanted spontaneous and stimulated emission processes when storing light on a single photon level [24]. The photon-echo QM based on controlled reversible inhomogeneous broadening [15][16][17][18][19] is free of these noise problems. But this technique has a lower time-multiplexing capacity than classical photon echoes, for a given optical depth, due to loss of storage efficiency as the controlled frequency bandwidth is increased [20,25]. Some of us recently proposed a photon-echo type QM based on an atomic frequency comb (AFC) [20] that has a storage efficiency independent of the bandwidth, allowing optimal use of the inhomogeneous broadening of rare-earthdoped crystals. An AFC memory has the potential for providing multimode storage capacity [20,25] crucial to quantum repeaters. In a first experiment [21] based on this scheme we performed a light-matter interface at the single-photon level. However, the light was retrieved after a predetermined storage time, while for quantum repeaters it is crucia...