The Murcia regional government said a hospital in Lorca was being evacuated, dozens of injured people were being treated at the scene and a field hospital was being set up.
The Spanish prime minister's office put the death toll at 10 and the Murcia regional administration said the deaths included a minor and occurred with the second, stronger quake.
Large chunks of stone and brick fell from the facade of a church in Lorca as a reporter for Spanish state TV was broadcasting live from the scene. A large church bell was also among the rubble, which missed striking the reporter, who appeared to be about 30 feet (9 meters) away when it fell. The broadcaster reported that schoolchildren usually gather at that spot around that time, and if it had happened 10 minutes later, a "tragedy" could have occurred.
Spanish TV showed images of cars that were partially crushed by falling rubble, and large cracks in buildings. Nervous groups of residents gathered in open public places, talking about what happened and calling relatives and friends on their cell phones. An elderly woman appeared to be in shock and was seated in a chair as people tried to calm her.
"I felt a tremendously strong movement, followed by a lot of noise, and I was really frightened," the newspaper El Pais quoted another Lorca resident Juani Avellanada as saying. It did not give her age.
Yet another resident, Juana Ruiz, said her house split open with the quake and "all the furniture fell over," according to El Pais.
John Bellini, a seismologist with the U.S. Geological Survey's National Earthquake Information Center in Golden, Colorado, said the larger earthquake had a preliminary 5.3 magnitude and struck 220 miles (350 kilometers) south-southeast of Madrid at 6:47 p.m. (1647 GMT, 12:47 p.m. EDT).
The quake was about 6 miles (10 kilometers) deep, and was preceded by the smaller one with a 4.5 magnitude in the same spot, Bellini said. He classified the bigger quake as moderate and said it could cause structural damage to older buildings and masonry.
The quakes occurred in a seismically active area near a large fault beneath the Mediterranean Sea where the European and African continents brush past each other, USGS seismologist Julie Dutton said.
The USGS said it has recorded hundreds of small quakes in the area since 1990.