When the core hydrogen is exhausted during stellar evolution, the central region of a star contracts and the outer envelope expands and cools, giving rise to a red giant. Convection takes place over much of the star's radius. Conservation of angular momentum requires that the cores of these stars rotate faster than their envelopes; indirect evidence supports this. Information about the angular-momentum distribution is inaccessible to direct observations, but it can be extracted from the effect of rotation on oscillation modes that probe the stellar interior. Here we report an increasing rotation rate from the surface of the star to the stellar core in the interiors of red giants, obtained using the rotational frequency splitting of recently detected `mixed modes'. By comparison with theoretical stellar models, we conclude that the core must rotate at least ten times faster than the surface. This observational result confirms the theoretical prediction of a steep gradient in the rotation profile towards the deep stellar interior.