Ecuadoreans have begun burying loved ones killed by the country's deadliest earthquake in decades as hopes faded for the rescue of more survivors.
In the small town of Montecristi, near the port city of Manta, two children were among those buried. They were killed with their mother while buying school supplies when the magnitude-7.8 quake struck on Saturday night.
The funeral was held outside under a makeshift awning because the town's Roman Catholic church was unsafe from structural damage. Family members wailed and one man fainted as the children were laid to rest in an above-ground vault.
Scenes of mourning multiplied all along Ecuador's normally placid Pacific coastline, where the tremor flattened towns and killed hundreds. Undertakers are running out of coffins to accommodate so many casualties and local governments are paying to bring them in from other cities.
The government put the latest death toll at 507, but officials expected more bodies to be found, with the Defence Department reporting 231 people still missing. The final toll could surpass casualties from earthquakes in Chile and Peru in the past decade.
Among the dead were at least nine foreigners, including an American and two Canadians.
But even as grief mounted, there were glimmers of hope.
In several cities on Tuesday, rescuers with sniffer dogs, hydraulic jacks and special probes that can detect breathing from far away continued to search for survivors among the rubble. At least six were found in Manta early that day.
One of the most hopeful tales was that of Pablo Cordova, who held out for 36 hours beneath the rubble of the hotel where he worked in Portoviejo, drinking his own urine and praying that the mobile phone service would be restored before his phone battery died.
He was finally able to call his wife on Monday afternoon and was pulled from the wreckage soon after by a team of rescuers from Colombia.
Cordova's wife had given up on ever seeing him again and even bought a coffin.
"They were organising the funeral, but I've been reborn," Mr Cordova said in hospital. "I will have to give that coffin back because I still have a long way to go before I die."
Rescuers who have arrived from Mexico, Colombia, Spain and other nations said they would keep searching for survivors, but warned that time was running out and the likelihood of finding more people alive grew smaller with the passage of every hour.
Even as authorities begin to shift their attention to restoring electricity and clearing debris, the earth continued to move.
On Tuesday afternoon, a magnitude-5.5 tremor rattled buildings in the region. It was the second strongest of more than 400 aftershocks since the weekend quake and was felt 105 miles away in the capital Quito.
Saturday's earthquake destroyed or damaged about 1,500 buildings, triggered mudslides and left some 20,000 people homeless, the government said. It was the worst tremor in Ecuador since one in 1949 killed more than 5,000 people.
Thirteen nations are involved in the relief effort. Cuba sent doctors, Venezuela has flown in food and the US government said it was sending a team of disaster experts as well as 100,000 dollars in aid.
President Barack Obama spoke by phone with Ecuadorean president Rafael Correa. The White House said Mr Obama offered condolences on behalf of the American people for lives lost.
The United Nations' top official for emergency relief, under-secretary general for Humanitarian Affairs Stephen O'Brien, toured devastated areas to see how aid pouring into the country could be best directed to ravaged communities.
Mr Correa has spent the past days overseeing relief efforts and delivering supplies. He said the quake caused three billion dollars of damage, about 3% of gross domestic product, and rebuilding would take years.
"It's going to be a long battle," he said.
After a deadly earthquake in 2010, Chile was able to get back on its feet quickly thanks to a commodities boom that was energising its economy.
But Ecuador must rebuild amid a deep recession that has forced austerity on the OPEC nation's finances. Even before the quake, the International Monetary Fund was forecasting the oil-dependent economy would shrink 4.5% this year.