(Recasts with worshipers praying for victims, adds comments from residents, updates number of killed, Tweet from Mexico City mayor)
MEXICO CITY, Sept 24 (Reuters) - Mexicans packed churches on Sunday to pray for the victims of the country's deadliest quake in 32 years as rescue teams searched against the odds for any survivors trapped under rubble six days after the tremor shook Mexico City and nearby states.
As a fresh aftershock jolted southwestern Mexico on Sunday, the death toll from Tuesday's 7.1 magnitude earthquake climbed to 319 people. With thousands of buildings damaged, survivors slept on the street outside their homes and estimates of the cost of the earthquake ran as high as $8 billion.
Many have been traumatized by the second major quake to strike Mexico City in their lifetime after a devastating 1985 tremor killed an estimated 10,000 people.
In the vast Basilica of Our Lady of Guadalupe in the north of the capital, the national shrine of the majority Catholic country, thousands of people gathered to pray.
"I came to ask God for strength for those who lost loved ones and for the Virgin to watch over us and keep us safe," said 69-year-old Maria Gema Ortiz. "Thanks to all those who came from other countries to help. Thanks to all and long live Mexico!"
Makeshift places of worship have popped up next to the crumbling cement and mangled steel of collapsed buildings in the deeply religious country.
In upscale Roma, one of the hardest-hit neighborhoods of the capital, a priest led mass for nearly two dozen people under a blue tarp while a nun handed out small cards with an image of the Virgin of Guadalupe, who according to the Catholic faith first appeared to an Aztec convert in 1531.
President Enrique Pena Nieto, who has visited the scene of the devastation, has urged Mexicans to turn their attention to rebuilding and many schools were expected to reopen on Monday.
Rescuers narrowed their search to a handful of buildings in the sprawling capital of 20 million people, using advanced audio equipment to detect signs of life beneath tonnes of rubble, with help from teams from as far afield as Israel and Japan.
"The search and rescue in Mexico City continues as a priority, with cooperation from national and international groups," tweeted Miguel Angel Mancera, Mexico City's mayor.
With Mexico facing a presidential election next year, the government's response to the disaster is under close scrutiny.
Frustration has grown among the thousands left homeless by Tuesday's quake, with critics saying the government's reaction pales in comparison with an outpouring of volunteer support, from rescue work to food donations.
"We have received no help from authorities," said Antonio Ramirez, who was conducting a survey of damaged homes in the historic Xochimilco district in the south of the capital.
"The help has come from ordinary people," the 57-year-old retired teacher said. "Soldiers, instead of carrying picks and shovels, brought their guns."
Hitting back against criticism of his government, Pena Nieto has promised ongoing support to those affected. The government's resources, however, are being stretched by the magnitude of the disaster.
Tuesday's quake, which completely flattened dozens of structures in Mexico City, was the second major earthquake to strike the country of 127 million people this month.
A massive 8.1 magnitude quake on Sept. 7 off the southwestern coast of Mexico killed around 100 people, most of them in the nearby states of Oaxaca and Chiapas. A series of aftershocks since then have sown panic.
The latest tremor, of 5.7 magnitude, struck on Sunday off the west coast, with its epicenter 80 km (50 miles) south-southwest of Tonala, in Chiapas, the U.S. Geological Survey said. There were no immediate reports of significant damage.
Many more quakes are likely, warned Xyoli Perez Campos, director of Mexico's National Seismological Service.
"We have already recorded more than 4,300 aftershocks," Campos said. "So more aftershocks are to come. What we don't know is if they are going to be of significant magnitude."
'LIFE MUST GO ON'
In Mexico City, the search for survivors from Tuesday's quake continued in a ruined office building in the Roma neighborhood and in a five-story apartment building in historic Tlalpan.
Authorities called off efforts in the upper-middle class Linda Vista zone after pulling 10 bodies from the rubble, while work at the Tlalpan building was briefly halted on Saturday by a magnitude 6.2 aftershock.
Roberto Hernandez, 62, leading a group of Mexico's famed "mole" rescue workers at the collapsed office building in Roma, said he believed 30 people were trapped in the rubble, though it was not clear how many were sill alive.
"We can't guarantee there is life but we can guarantee we'll turn over every last stone," Hernandez said, adding that one person was found alive in a crushed building 15 days after the 1985 earthquake.
In tents set up in different parts of the city, psychologists offered mental health support to traumatized survivors and rescuers. Acts of solidarity came from all corners of Mexican society.
While lessons were expected to resume on Monday, at least 7,000 schools across the country have been damaged by the quakes. The Mexican government says at least 350 of them need to be completely rebuilt.
Like many residents, 36-year-old Claudia Avila was determined to return to some semblance of normality.
"We are afraid, but life must go on," said Avila, whose sons are 9 and 16. "Tomorrow I will take my children back to school. They know that if something happens, they must protect themselves. It has been a rude awakening."
Pena Nieto highlighted his government's aid for survivors on a Saturday tour of Jiquipilas in Chiapas, which was badly hit by the Sept. 7 quake.
"Be assured that the federal government is here, the state and local governments, supporting you, hand in hand, to rebuild," he said.
But many Mexicans are wary of politicians' using the quake to score political points ahead of 2018 elections that are seen as a referendum on the patchy record of the Institutional Revolutionary Party since its return to power in 2012.
Francisco Honoraro, a 46-year-old farmer in Xochimilco, is living on the streets while he waits for authorities to assess damage to his home.
"This is going to become political, a campaign issue and a source of profit," he said. "'If you support me and you vote for me, we will help you."'
(Additional Reporting by Michael O'Boyle; Writing by Anthony Esposito and Daniel Flynn; Editing by Lisa Von Ahn and Sandra Maler)