At 5:54 a.m. on 27 May 2006, a magnitude 6.3 earthquake struck south of Yogyakarta on the Indonesian island of Java, rupturing the Opak Fault at a shallow depth of only about 10 km. The early-morning timing meant most residents were still asleep at home when the shaking hit.

The quake killed an estimated 5,700 people and injured tens of thousands more, with the district of Bantul bearing the brunt of the destruction. More than 150,000 homes were destroyed or badly damaged and roughly 600,000 people were left homeless, most of them living in traditional brick and tile-roof houses that were never engineered to withstand strong shaking.

Despite its moderate magnitude, the quake caused disproportionate damage because its shallow, onshore rupture struck directly beneath one of Java's most densely populated regions. It also damaged parts of the nearby UNESCO World Heritage Prambanan temple complex, cracking reliefs and toppling stone elements from some of its ninth-century towers.

NOAA's National Centers for Environmental Information (NCEI) records the Yogyakarta earthquake in its Significant Earthquake Database with a maximum Modified Mercalli intensity of VIII–IX near Bantul. Indonesia's disaster agency BNPB cites the 2006 quake as a turning point that pushed the country toward the stronger community-based earthquake preparedness programmes still used across Java today.