Space missions1 and ground-based observations2 have shown that some asteroids are loose collections of rubble rather than solid bodies. The physical behaviour of such ‘rubble-pile’ asteroids has been traditionally described using only gravitational and frictional forces within a granular material3. Cohesive forces in the form of small van der Waals forces between constituent grains have recently been predicted to be important for small rubble piles (ten kilometres across or less), and could potentially explain fast rotation rates in the small-asteroid population4,5,6. The strongest evidence so far has come from an analysis of the rotational breakup of the main-belt comet P/2013 R3 (ref. 7), although that was indirect and poorly constrained by observations. Here we report that the kilometre-sized asteroid (29075) 1950 DA (ref. 8) is a rubble pile that is rotating faster than is allowed by gravity and friction. We find that cohesive forces are required to prevent surface mass shedding and structural failure, and that the strengths of the forces are comparable to, though somewhat less than, the forces found between the grains of lunar regolith.