We report observations of a filament eruption, two-ribbon flare, and coronal mass ejection (CME) that occurred in Active Region NOAA 10898 on 6 July 2006. The filament was located South of a strong sunspot that dominated the region. In the evolution leading up to the eruption, and for some time after it, a counter-clockwise rotation of the sunspot of about 30 degrees was observed. We suggest that the rotation triggered the eruption by progressively expanding the magnetic field above the filament. To test this scenario, we study the effect of twisting the initially potential field overlying a pre-existing flux rope, using three-dimensional zero–β MHD simulations. We consider a magnetic configuration whose photospheric flux distribution and coronal structure is guided by the observations and a potential field extrapolation. We find that the twisting leads to the expansion of the overlying field. As a consequence of the progressively reduced magnetic tension, the flux rope quasi-statically adapts to the changed environmental field, rising slowly. Once the tension is sufficiently reduced, a distinct second phase of evolution occurs where the flux rope enters an unstable regime characterized by a strong acceleration. Our simulation thus suggests a new mechanism for the triggering of eruptions in the vicinity of rotating sunspots.