Light usually propagates inside transparent materials in well known ways1. However, recent research2, 3, 4, 5, 6 has examined the possibility of modifying the way the light travels by taking a normal transparent dielectric and inserting tiny metallic inclusions of various shapes and arrangements. As light passes through these structures, oscillating electric currents are set up that generate electromagnetic field moments; these can lead to dramatic effects on the light propagation, such as negative refraction. Possible applications include lenses that break traditional diffraction limits3, 4 and 'invisibility cloaks' (refs 5, 6). Significantly less research has focused on the potential of such structures for slowing, trapping and releasing light signals. Here we demonstrate theoretically that an axially varying heterostructure with a metamaterial core of negative refractive index can be used to efficiently and coherently bring light to a complete standstill. In contrast to previous approaches for decelerating and storing light7, 8, 9, 10, 11, 12, 13, the present scheme simultaneously allows for high in-coupling efficiencies and broadband, room-temperature operation. Surprisingly, our analysis reveals a critical point at which the effective thickness of the waveguide is reduced to zero, preventing the light wave from propagating further. At this point, the light ray is permanently trapped, its trajectory forming a double light-cone that we call an 'optical clepsydra'. Each frequency component of the wave packet is stopped at a different guide thickness, leading to the spatial separation of its spectrum and the formation of a 'trapped rainbow'. Our results bridge the gap between two important contemporary realms of science—metamaterials and slow light. Combined investigations may lead to applications in optical data processing and storage or the realization of quantum optical memories.