Updated

A 7.4-magnitude earthquake rocked Guatemala on Wednesday, killing at least 48 people in two provinces as it toppled thick adobe walls, shook huge landslides down onto highways, and sent terrified villagers streaming into the streets of this idyllic mountain town near the border with Mexico. One hundred people were missing, and hundreds were injured.

The quake, which hit at 10:35 a.m. in the midst of the work day, caused terror over an unusually wide area, with damage reported in all but one of Guatemala's 22 states and shaking felt as far away as Mexico City, 600 miles to the northwest.

President Otto Perez Molina said at a news conference that 40 people died in the province of San Marcos and eight more were killed in the neighboring province of Quetzaltenango.

San Marcos, where more than 30 homes collapsed, bore the brunt of the temblor's fury.

More than 300 people, including firefighters, policemen and villagers, tried to dig through a half ton of sand at a quarry in the commercial center of town in a desperate attempt to rescue seven people believed buried alive. Among those under the sand was a 6-year-old boy who had accompanied his grandfather to work.

"I want to see Giovanni! I want to see Giovanni!" the boy's mother, 42-year-old Francisca Ramirez, frantically cried. "He's not dead. Get him out." She said the boy's father had emigrated to the U.S. and there was no way to reach him.

Perez flew to San Marcos to view the damage in this lush mountainous region of 50,000 indigenous farmers and ranchers, many belonging to the Mam ethnic group.

"One thing is to hear about what happened and another thing entirely is to see it," Perez told The Associated Press. "As a Guatemalan I feel sad ... to see mothers crying for their lost children."

The president said the government would pay for the funerals of all victims in the poor region.

Efrain Ramos helped load a tiny casket carrying the body of his 6-year-old niece from San Marcos' morgue to a waiting pickup truck.

"She is my niece. The little girl died when a wall fell over her," a shocked Ramos told a reporter. He said the girl was playing in her room when the quake hit.

The girl's mother hugged the coffin wrapped with white lace and tulle while sobbing uncontrollably.

Ramos said the family would escort his niece Rosa's body back home for a viewing.

Many of the colorful adobe buildings in the 10-square-mile center of San Marcos were either cracked or reduced to rubble, including the police station and the courthouse. The temblor left a large gash in one of the streets, and hundreds of frightened villagers stood in the open, refusing to go back inside.

Hundreds of people crammed into the hallways of the small town hospital waiting for medical staff to help injured family members, some complaining they were not getting care quickly enough.

Ingrid Lopez, who went to the hospital with a 72-year-old aunt whose legs were crushed by a falling wall, said she had waited hours for an X-ray.

"We ask the president to improve conditions at the hospital," she said. "There isn't enough staff."

The quake, which was 20 miles deep, was centered 15 miles off the coastal town of Champerico and 100 miles southwest of Guatemala City. It was the strongest earthquake to hit Guatemala since a 1976 temblor that killed 23,000.

Officials said most of 100 missing were from San Marcos. The mainly indigenous inhabitants farm corn and herd cattle, mostly for their own survival.

Hospital officials in San Marcos said they had received 150 injured.

"I've been in Guatemala for almost two years and I am used to earthquakes. This was a lot more severe, a lot more shaky," said Peace Corps volunteer Adam Baker, 27, of Carmel, Indiana, who tweeted a picture of a small landslide behind his house in the nearby state of Quetzaltenango. "Things fell in my kitchen."

Perez said more than 2,000 soldiers were deployed from a base in San Marcos to help with the disaster. A plane had already made two trips to carry relief teams to the area.

The president urged people to stay put as emergency crews try to reach victims on the few roads not blocked by landslides or debris. He also encouraged people in the affected areas to stay outside and away from tall buildings.

David de Leon, spokesman for civil protection, told radio station Emisoras Unidas that officials were working on evacuations and relief. There were four strong aftershocks by late afternoon.

Perez said 150 people had been evacuated by air from the San Marcos area.

The country's minister of communications and infrastructure told Emisoras Unidas that landslides had blocked several highways in the west of the country, and it would take at least 24 hours to re-establish transport links to San Marcos.

A spokesman for El Salvador's Red Cross branch told The Associated Press that the quake had been felt throughout the country, sending people fleeing their homes in the capital, but there had been no immediate reports of injuries or serious damage.

The mayor of Mexico City said no serious damage or injuries were reported in the city, although many people fled their offices and homes during the quake.

In San Marcos, 91 inmates, including five women, were huddled to one side of the adobe makeshift jail that had floor-to-ceiling cracks and threatened to collapse. Police told the prisoners they were to be moved.

"We'd rather stay here and reconstruct the jail than be displaced. That will be hard for our families," said inmate Benjamin Tomas Gomez.