There were no initial reports of damage or casualties from the quake, which struck about 12:21 a.m. Afghan time (1951 GMT, 3:51 p.m. EDT Thursday).
However, the temblor was centered in a remote mountain area where communications are poor and reports of casualties take time to reach the capital.
The earthquake had a preliminary magnitude of 6.2 and was centered in the mountains about 167 miles (268 kilometers) northeast of Kabul and 140 miles (230 kilometers) west of Mingaora, Pakistan, according to the U.S. Geological Survey.
Buildings shook in the Pakistani cities of Peshawar and the capital Islamabad, and the quake was felt as far east as Lahore near the Indian border, Pakistani television stations reported.
The Afghan Interior Ministry said it had no immediate reports of deaths or damage.
Paul Caruso, a geophysicist with the U.S. Geological Survey, said that even though the quake was centered in a remote area, casualties were still possible given the size of the temblor. Caruso said Friday's quake was felt as far away as New Delhi, the Indian capital.
Caruso said the area is capable of producing large earthquakes because of the compression created when what is now India slammed against the Asian continent millions of years ago.
He said the largest quake recorded in that area was 7.8 on March 14, 1965.