ISLAMABAD: A magnitude 6.5 earthquake rattled much of Pakistan and Afghanistan on Tuesday, sending panicked residents fleeing from homes and offices and frightening people even in remote villages. At least nine people died.More than 100 people were brought to hospitals in the Swat valley region of Pakistan’s northwestern Khyber Pakhtunkhwa province in a state of shock, Bilal Faizi, a spokesman for Pakistan’s emergency services told The Associated Press.”These terrified people collapsed, and some of them collapsed because of the shock of the earthquake,” he said. Faizi said most were later discharged from the hospital.Faizi and other officials said nine people were killed when roofs collapsed in various parts of northwestern Pakistan. Dozens of others were injured in the quake, which was centered in Afghanistan and also felt in bordering Tajikistan. The earthquake triggered landslides in some of the mountainous areas, disrupting traffic.Taimoor Khan, a spokesman for the provincial disaster management authority in the northwest, said at least 19 mudbrick homes collapsed in remote areas. “We are still collecting data about the damages,” he said.The powerful tremors sent many people fleeing their homes and offices in Pakistan’s capital of Islamabad, some reciting verses from the Qur’an, Islam’s holy book. Media reports suggested cracks had appeared in some apartment buildings in the city.The scene was repeated in Kabul and other parts of Afghanistan.”The quake was so strong and terrifying, we thought houses are collapsing on us, people were all shouting and were shocked,” said Shafiullah Azimi, a Kabul resident.The US Geological Survey said the center of the magnitude 6.5 quake was located 40 kilometers (25 miles) south-southeast of Jurm in Afghanistan’s mountainous Hindukush region, bordering Pakistan and Tajikistan. It said the depth of the earthquake was 187.6 kilometers (116 miles).Rakhshinda Tauseed, a physician, said she was at her hospital in the eastern Pakistani city of Lahore when the earthquake hit. “I quickly asked patients to go move to a safer place,” she said.Khurram Shahzad, a resident in Pakistan’s garrison city of Rawalpindi, said he was having dinner with his family at a restaurant when the walls started swaying.”I quickly thought that it is a big one, and we left the restaurant and came out,” he told The Associated Press by phone. He said he saw hundreds of people standing on the streets.The situation was similar in Peshawar, the capital of Khyber Pakhtunkhwa province on the border with Afghanistan, where people were seen standing outside their homes and offices.Pakistani Prime Minister Shahbaz Sharif in a statement said he asked disaster management officials to remain vigilant to handle any situation.Zabihullah Mujahid, the main spokesman for the Taliban government in Afghanistan, tweeted that the Ministry of Public Health had ordered all health centers to be on standby.The region is prone to violent seismic upheavals. A magnitude 7.6 quake in 2005 killed thousands of people in Pakistan and Kashmir.Last year in southeastern Afghanistan, a 6.1 magnitude quake struck a rugged, mountainous region, flattening stone and mud-brick homes. Afghanistan’s Taliban rulers put the total death toll from the quake at 1,150, with hundreds more injured, while the UN has offered a lower estimate of 770.