ISLAMABAD — A strong earthquake shook the Pakistani capital, Islamabad, late Friday night, rattling buildings and forcing sleeping residents out of their homes.

There were no immediate reports of casualties or extensive damage, but officials said an emergency had been declared protectively at hospitals.

Pakistani official Ghulam Rasool told The Associated Press that the magnitude-6.9 quake was centered in Tajikistan near the Afghan border, beginning after midnight and lasting for 59 seconds.

However, the U.S. Geological Survey reported that the quake measured at magnitude 6.2 and was centered in the Hindu Kush region of Afghanistan. Twitter users in the Afghan capital, Kabul, reported feeling the tremors.

The quake was also felt in Peshawar and Kashmir in Pakistan. In Islamabad, some residents remained outside their homes despite the chilly winter weather, fearful of aftershocks. Sahiba Khan, an 18-year-old student, said she was reading when the earthquake jolted her home. All of her family members emerged, reciting verses from Quran.