There were no immediate reports of any casualties or damage.
The U.S. Geological Survey said the December 20 earthquake measuring 6.1 on the Richter scale hit 51 kilometers southwest of Jurm — a sparsely populated, remote mountain area in Badakhshan Province, and was more than 200 kilometers deep.
The Indian weather office put its magnitude at 6.3.
The quake could be felt as far away as the Indian capital, New Delhi.
In Lahore, southern Pakistan, panicked people came onto the streets and got out of their cars, AFP reported.
Earthquakes are common in the region.
In October 2015, a quake killed more than 400 people and left several thousand homeless in Afghanistan, Pakistan, and India.