The Yarkovsky-O’Keefe-Radzievskii-Paddack (YORP) effect is believed to alter the spin states of small bodies in the solar system. However, evidence for the effect has so far been indirect. We report precise optical photometric observations of a small near-Earth asteroid, (54509) 2000 PH5, acquired over 4 years. We found that the asteroid has been continuously increasing its rotation rate ω over this period by dω/dt = 2.0 (±0.2) × 10-4 degrees per day squared. We simulated the asteroid’s close Earth approaches from 2001 to 2005, showing that gravitational torques cannot explain the observed spin rate increase. Dynamical simulations suggest that 2000 PH5 may reach a rotation period of ~20 seconds toward the end of its expected lifetime.