Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Earthquake-stricken Ecuador faced the grim reality of recovering more bodies than survivors as rescue efforts moved into a third day on Tuesday and the death toll climbed to over 500.

Officials also began evaluating the monumental task of rebuilding from Saturday's magnitude-7.8 quake — one of the Latin American nation's most devastating in decades — and said the number of dead rose to 507 with about 2,560 people injured.

Related: Ecuador Earthquake Death Toll Rises, One American Dead

The majority of the dead have been identified and returned to loved ones, the Attorney General's Office said. At least 11 foreigners, including one American, were among those killed.

President Rafael Correa, meanwhile, said it could cost as much as $3 billion to rebuild — about 3 percent of Ecuador's gross domestic product.

"It's going to be a long battle," he told reporters Tuesday.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

On Monday, teams fanned out across the country's Pacific coastline to look for the dozens of people still missing.

Praying for miracles, desperate family members urged rescuers to find their missing loved ones as they dug through the debris of flattened homes, hotels, and stores.

In the port city of Manta, a group of about 50 rescuers working with sniffer dogs, hydraulic jacks and a drill managed to free eight people trapped for more than 32 hours in the rubble of a shopping center that was flattened by Saturday night's quake.

The first rescue took place before dawn, when a woman was pulled headfirst from a nearly 2½-foot hole cut through concrete and steel. Firefighters applauded as she emerged from the debris, disoriented, caked in dust and complaining of pain but otherwise in good health.

Another uplifting scene played out in nearby Portoviejo, where a cellphone call to a relative from under the debris of a collapsed hotel led searchers to Pablo Cordova, the hotel's administrator. Once he was gingerly removed, he was immobilized and hauled away on a stretcher, his hands waving in the air in a sign of appreciation to cheering onlookers.

"Since Saturday, when this country started shaking, I've slept only two hours and haven't stopped working," said Juan Carranza, one of the firefighters leading the rescue effort in Portoviejo.

Rescuers recover the body of a dead child from the rubble in Pedernales, Ecuador, on Monday. RODRIGO BUENDIA / AFP - Getty Images

Despite such cheering moments, tragedy continued to mount. At the shopping center in Manta, authorities were working to free a woman they had found buried alive with a heavy concrete slab pinning her legs when an aftershock forced them to suspend the effort. When they returned the debris pile had moved and the woman was dead, said Angel Moreira, a firefighter coordinating the effort.

The government reported late Monday that the official death count had increased to 413 and said they expected the toll to rise further in the days ahead. Among the dead were an American and two Canadians.

In Pedernales, a devastated rustic beach town, a local soccer stadium was serving as a makeshift relief center and a morgue.

Complicating rescue efforts is the lack of electricity in many areas, meaning noisy power generators must be used, making it harder to hear anyone who might be trapped beneath rubble.

The U.S. has offered assistance but so far President Correa, a strong critic of U.S. foreign policy in Latin America, has yet to respond publicly.