BANTUL, Indonesia (AP) -- Desperate relatives searched rubble for survivors Saturday after a powerful earthquake flattened nearly all the buildings in this rice-farming town while residents slept, killing more than 3,500 people on Indonesia's densely populated Java island.
The magnitude-6.3 quake wounded thousands more and was the nation's worst disaster since the 2004 tsunami. It also triggered fears that a rumbling volcano nearby would erupt.
The earthquake struck at 5:54 a.m. near the famed Borobudur temple complex, caving in roofs and sending concrete walls crashing down. Thousands were wounded. Survivors screamed as they ran from their homes, some clutching bloodied children and the elderly.
The worst devastation was in the town of Bantul, where 80 percent of the homes were destroyed and more than 2,000 people killed. Residents started digging mass graves almost immediately, with family members sobbing and reading the Quran beside rows of corpses awaiting burial beneath a blazing sun.
Village heads recorded their names so the victims could be added to the official death toll. Subarjo, a 70-year-old food vendor, sobbed next to his dead wife, his house destroyed.
"I couldn't help my wife ... I was trying to rescue my children, one with a broken leg, and then the house collapsed," he said. "I have to accept this as our destiny, as God's will."
It was the recent in a series of disasters to strike Indonesia -- from the 2004 tsunami that ravaged Aceh province to a widening bird flu outbreak to the threat of eruption from nearby Mount Merapi.
The quake's epicenter was 50 miles south of the rumbling Merapi, and activity increased soon after the temblor. A large burst spewed hot clouds and sent debris cascading some two miles down its western flank.
Bambang Dwiyanto of the Energy and Mineral Ministry could not say whether the quake caused the volcanic activity but warned that it could trigger a larger eruption.
"It will influence the activities of Mount Merapi, particularly in the lava dome," said Dwiyanto, head of the ministry's geological division.
Indonesia, the world's largest archipelago, is prone to seismic upheaval due to its location on the so-called Pacific "Ring of Fire," an arc of volcanos and fault lines encircling the Pacific Basin.
Saturday's quake was centered about six miles below the surface, the U.S. Geological Survey said.
Anthony Guarino of the CalTech Seismological Laboratory in Pasadena, Calif., said Indonesia has the second-highest number of erupted volcanos in historic time, outside of Japan. It also has the largest number of volcanos in the world -- 76.
As night fell across the disaster zone - stretching across hundreds of square miles of mostly farming communities in Yogyakarta province -- tens of thousands of people prepared to sleep on streets, in rice fields and in backyards, fearful of aftershocks.
International agencies and other nations promised to send relief immediately.
Power and telephone service was out across much of the region, adding to their terror. After spending hours digging in vain through the smoldering debris, many said they were giving up their search for relatives or friends until morning.
"It's just too dark," said Sarjio, who was looking for his 40-year-old neighbor, believed to be trapped beneath the remains of her house. "There's nothing we can do now."
President Susilo Bambang Yudhoyono ordered the army to evacuate victims and arrived with a team of Cabinet ministers to oversee rescue operations. He slept in a tent camp with survivors.
At least 3,505 were killed in the quake, command post officials from the affected districts told The Associated Press. Two-thirds of the fatalities were in Bantul.
"The numbers just keep rising," said Arifin Muhadi of the Indonesian Red Cross, adding that more than 3,400 people were hurt.
The only foreigner reported killed or injured in the quake was a man from Holland. U.S. Embassy spokesman Max Kwak said he did not know of any American casualties, and said the United States was contributing $100,000 for search-and-rescue efforts and emergency care.
Yogyakarta is about 18 miles from the sea. In the chaos that followed the quake, false rumors of an impending tsunami sent thousands of people fleeing to higher ground in cars and on motorbikes.