Updated

Desperate relatives searched the rubble for survivors after a powerful earthquake flattened houses in central Indonesia, killing more than 3,500 people in this ancient city and nearby towns. It was the nation's worst disaster since the 2004 tsunami and triggered fears that a nearby volcano would erupt.

The magnitude-6.3 quake struck at 5:54 a.m. near the famed Borobudur temple complex as many people were sleeping, 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.

Countrywatch: Indonesia

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, family members sobbing and reading the Quran beside rows of corpses awaiting burial.

As night fell across the disaster zone — stretching across hundreds of square miles of mostly farming communities in densely populated Yogyakarta province — tens of thousands of people prepared to sleep on streets, in rice fields, and in backyards, fearful of aftershocks.

Power was out across much of the region, adding to their terror. After spending hours digging in vain through the smoldering debris, many said they would have to give 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 help evacuate victims and arrived Saturday afternoon with a team of Cabinet ministers to oversee rescue operations, telling people "at a time like this we have to unite." He slept in a tent camp with survivors.

It was the recent in a series of disasters to strike Indonesia — from the tsunami that ravaged Aceh province, to a widening bird flu outbreak, to the threat of volcanic eruption from nearby Mount Merapi.

At least 3,505 were killed in the quake, command post officials from each of the affected districts told The Associated Press, two-thirds of the fatalities in devastated Bantul.

"The numbers just keep rising," said Arifin Muhadi of the Indonesian Red Cross, adding that more than 3,400 people were hurt.

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.

The quake cut electricity and phone lines in some areas.

It struck close to the rumbling Mount Merapi, and soon after the temblor a large burst of hot clouds and debris avalanched 2 miles down its western flank. No one was injured.

Bambang Dwiyanto, the Energy and Mineral Ministry's chief geologist, said the two events did not appear to be directly related, but warned that Saturday's earthquake could still trigger a larger eruption.

"It will influence the activities of Mount Merapi, particularly in the lava dome," he cautioned.

A geological researcher at the Indonesian Science Institute, Dani Hilman, said however he did not think the quake was powerful enough to create a large eruption.

The quake also cracked the runway and the waiting lounge at the airport in Yogyakarta, close to the famed Borobudur temple, closing it to aircraft until at least Sunday while inspections take place, Transport Minister Hatta Radjasa said.

Officials said the 7th century 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 a million tourists flock to the temples every year.

One man from Holland died in Saturday's quake, but there were no other reports of foreigners killed or injured. U.S. Embassy spokesman Max Kwak said he did not know of any American casualties.

U.S. Secretary of State Condoleezza Rice extended American condolences and announced an emergency allocation of $500,000 for assistance to earthquake victims. She said U.S. Agency for International Development workers were in Yogyakarta and the surrounding area to assess aid requests.

Other governments and international aid organizations also promised money, medical teams, tents and other forms of humanitarian relief.

Indonesia, the world's largest archipelago, is regularly rocked by earthquakes because of its location on the so-called Pacific "Ring of Fire," an arc of volcanos and fault lines encircling the Pacific Basin.

On Dec. 26 2004, a 9.1 quake triggered a tsunami that crashed into 11 countries across the Indian Ocean, killing more than 230,000 people, most of them in the Indonesian province of Aceh.

Yogyakarta, around 1,390 miles southeast of Aceh, was not affected by the killer waves.