The great Sumatra-Andaman earthquake and tsunami of 2004 was a dramatic reminder of the importance of understanding the seismic and tsunami hazards of subduction zones. In March 2005, the Sunda megathrust ruptured again, producing an event of moment magnitude (M(w)) 8.6 south of the 2004 rupture area, which was the site of a similar event in 1861 (ref. 6). Concern was then focused on the Mentawai area, where large earthquakes had occurred in 1797 (M(w) = 8.8) and 1833 (M(w) = 9.0). Two earthquakes, one of M(w) = 8.4 and, twelve hours later, one of M(w) = 7.9, indeed occurred there on 12 September 2007. Here we show that these earthquakes ruptured only a fraction of the area ruptured in 1833 and consist of distinct asperities within a patch of the megathrust that had remained locked in the interseismic period. This indicates that the same portion of a megathrust can rupture in different patterns depending on whether asperities break as isolated seismic events or cooperate to produce a larger rupture. This variability probably arises from the influence of non-permanent barriers, zones with locally lower pre-stress due to the past earthquakes. The stress state of the portion of the Sunda megathrust that had ruptured in 1833 and 1797 was probably not adequate for the development of a single large rupture in 2007. The moment released in 2007 amounts to only a fraction both of that released in 1833 and of the deficit of moment that had accumulated as a result of interseismic strain since 1833. The potential for a large megathrust event in the Mentawai area thus remains large.