The temblor also triggered fears that a nearby rumbling volcano would erupt.
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 most 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 United States responded with an emergency allocation of $500,000 for assistance to victims.
"Through financial and material support, the United States is assisting with recovery efforts in coordination with Indonesian authorities, and we stand prepared to provide additional assistance as needed," President Bush said in a statement released late Saturday.
Secretary of State Condoleezza Rice said U.S. Agency for International Development personnel are in Yogyakarta, the central Indonesian city that bore much of the quake's impact.
The quake's epicenter was 50 miles south of the rumbling Merapi volcano, 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.
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.
The city is 1,390 miles southeast of Aceh province, where 131,000 people died in a December 2004 tsunami triggered by a magnitude-9.1 earthquake under the sea.
Many roads and bridges were destroyed, hindering efforts to get taxis and pickup trucks filled with wounded to hospitals.
Doctors struggled to care for the injured, hundreds of whom were lying on plastic sheets, straw mats and even newspapers outside the overcrowded hospitals, some hooked to intravenous drips dangling from trees.
Bloodstains littered the floor at Yogyakarta's Dr. Sardjito Hospital, along with piles of soiled bandages and used medical supplies.
"We are short of surgeons," said Alexander, a doctor who goes by one name. "There are still so many critically injured people here."
By nightfall, health officials at the hospital had tallied 89 dead, but bodies kept arriving and some family members were taking them home before they could be added to the official toll.
Neighboring Malaysia said it will send a 56-member search team, doctors and medical supplies, and the European Commission said it would release up to $3.8 million in emergency aid.
The World Food Program was sending a plane with 2 tons of medicine and eight truckloads of fortified noodles and biscuits, agency spokeswoman Brenda Barton said in Rome.
The Italian government also loaded a plane with 27 tons of tents, blankets, water purifiers, electric generators and other aid, the Foreign Ministry said.
UNICEF is sending 9,000 tarpaulins, 2,000 tents, health kits and hygiene kits, spokesman John Budd told CNN. He said a hospital and several health clinics had collapsed, and about 4,000 houses were destroyed.
Almost all people had already been evacuated away from the volcano's danger zone, and there were no reports of injuries there. A geological researcher at the Indonesian Science Institute, Dani Hilman, said he did not believe the quake was powerful enough to create a large eruption.
The quake cracked the runway and waiting area at the Yogyakarta airport, closing it to aircraft until at least Sunday while inspections take place, Transport Minister Hatta Radjasa said.
Officials said the famed 7th century Borobudur Buddhist temple, one of Indonesia's most popular tourist attractions, was not affected by the quake. Nearby Prambanan, a spectacular Hindu temple to the southeast, suffered some damage but it was not immediately clear how much, officials said.
Close to 1 million tourists visit the temples every year.