BAM, Iran (AP) _ Aid workers shifted their operations Tuesday from searching for survivors of Iran's devastating earthquake to helping the injured and homeless _ and burying the corpses still being pulled from the rubble.

The death toll from Friday's 6.6-magnitude quake that shook the ancient city of Bam rose to 28,000, according to Ted Peran, coordinator of U.N. relief operations. At least 12,000 people were injured, the health ministry said.

``We have gone out of the rescue phase and entered the humanitarian relief phase of the operation,'' Peran said. ``There's always hope of pulling more survivors out ... but the window of opportunity is closing rapidly.''

At a mass grave where thousands have already been buried, workers dug 130-foot-long trenches for corpses wrapped in white shrouds. One woman sat alone, pounding the ground with her fist.

``I was a good Muslim. I prayed to God all the time,'' sobbed 44-year-old Alma Sepehr, 44, said as she sobbed beside a grave holding the remains of 21 relatives including her daughter, son and husband. ``Why did this happen to us?''

The only American reported killed in the earthquake was Tobb Dell'Oro, 41, of California who was visiting Bam with his fiancee, 39-year-old Adele Freedman, U.S. media reported. They were trapped for several hours after the roof of their inn collapsed; Freedman survived, but Dell'Oro bled to death.

The State Department had said earlier that an American had died and another injured but did not disclose their names.

Some international rescuers headed home, saying they were frustrated at their inability to save lives. There were fears the number of dead could rise as high as 40,000 after Bam on Monday passed the critical mark of 72 hours after the quake, the longest period people are expected to survive in rubble.

Occasionally, people survive longer if they are trapped in a pocket with air to breathe, though Bam's traditional architecture sharply limited that possibility. The city's mud-brick houses, constructed without supporting metal or wooden beams, crumbled into small chunks and powder-like dust.

``We did not find anyone alive,'' said Steve Owens of the charity British International Search. His team spent 14 hours traveling less than 125 miles on a jammed road to Bam and reached the devastated city too late to help.

``We were a day late getting to the site,'' Owens said, waiting Tuesday at the airport in the provincial capital of Kerman for a flight back to England. ``When things like this happen, there should be ways to get teams in quicker. It's frustrating.''

Russia's Emergency Situations' Ministry said that its 150 rescuers would return to Moscow on Tuesday and that a plane carrying humanitarian aid would be sent to Iran on Wednesday.

At the peak of rescue efforts, 1,700 international relief workers from 30 countries had converged in Bam, Peran said. By Tuesday, the number of rescuers dropped to about 1,500 after seven teams returned home.

Meanwhile, new aid was arriving _ including an American military plane carrying 80 personnel and medical supplies that landed Tuesday in Kerman, 120 miles to the northwest of Bam, said provincial government spokesman Asadollah Iranmanesh.

The American team, which reached Bam by midday, came despite long-severed diplomatic relations and President Bush's naming of Iran as part of an ``axis of evil'' with Iraq and North Korea. Seven U.S. Air Force C-130 cargo planes had already been sent to the earthquake zone.

Secretary of State Colin Powell said in an interview with The Washington Post that Iran's acceptance of U.S. aid is the country's latest suggestion of a new attitude in Iran that could lead to a restoration of more friendly relations.

Powell also pointed to Iran's agreement to allow inspections of its nuclear facilities and its overtures to moderate Arab governments. ``There are things happening, and therefore we should keep open the possibility of dialogue at an appropriate point in the future,'' Powell said.

The United States and Iran's neighbors in the Gulf ranked among the largest contributors to the relief effort, Iranmanesh said.

On Tuesday, six Gulf states pledged $400 million to help reconstruct Bam, best known as the site of the world's largest medieval mud fortress, a 2,000-year-old citadel that crumbled in the quake. The pledge came after a meeting of finance ministers from the Gulf Cooperation Council countries _ Saudi Arabia, Kuwait, the United Arab Emirates, Qatar, Bahrain and Oman.

The traditional sun-dried, mud-brick construction of houses doomed many occupants, as it has for centuries in quake-prone Iran. Heavy roofs, often sealed with cement or plaster to keep out rain, sit atop mud-brick walls that have no support beams.

On Tuesday, residents scavenged the rubble in search of belongings. One man extracted a pair of trousers and a bottle of water from the rocks where his house used to be, only one wall left standing upright behind him. He found nothing else.

At the cemetery, white shrouds were laid out, waiting for bodies as bulldozers dug more graves. Hundreds of people gathered, sobbing for loved ones.

Nearby, another man pulled photos out of a plastic bag and showed them to others nearby, who started praying with him. The photos included a young girl, about 6, two young boys and a black and white photo of an old man.

Akbar Hesomi, 55, sat on a pile of rubble and watched Iranian rescuers search for four of his relatives with bare hands and shovels in the rocks of what used to be a four-story building.

``My girls, my boys! My girls, my boys,'' he repeated over and over.

___

Associated Press reporters Ali Akbar Dareini in Kerman and Alessandra Rizzo in Bam contributed to this report.