The quake, near the border with Pakistan, injured more than 2,500 people in mountainous areas that rescue workers took hours to reach.