A wide variety of materials ranging from metals to polymers can solidify as glasses rather than crystals. The glass transition is associated with a slowing down of molecular motion: a liquid becomes a glass when structural relaxation no longer occurs on experimentally accessible timescales. Most of our current knowledge about collective molecular motion in glass-forming materials is based on observations of the supercooled liquid state above the glass transition. The lack of direct information about molecular dynamics in the glass state itself leaves room for conflicting models of the glass transition. Here we show that, by taking advantage of confinement effects in thin films, molecular dynamics can also be probed experimentally below the glass transition. We use second-harmonic generation to study the relaxation behaviour of molecules of a glass-forming liquid crystal confined in a thin film on a silica plate. Our measurements provide direct evidence that the collective character of molecular motion is responsible for the slowing down of mobility in glasses.