The quake was felt in the Afghan capital, Kabul, and in the Pakistani capital, Islamabad, Al Jazeera's correspondents reported.
There were no initial reports of damage or casualties from the quake, which struck at about 12.21am Afghan time on Friday (19:51GMT Thursday), although information from rural areas is expected to take some time to filter out.
Alan Fisher, Al Jazeera's correspondent in Islamabad, said: "It shook large parts of Islamabad, for at least eight or nine seconds and then there was a very strong aftershock immediately afterwards.
"It wasn't just felt here in Islamabad, but also in Kabul and Karachi.
"The concern, of course, will be how much damage has it done to the epicentre and the towns there.
"At the moment, as the Pakistani army is fighting a major offensive in South Waziristan, they may have to put a great deal of resources into the area where the earthquake may have caused damage," Al Jazeera's correspondent said.
"That might affect the operation ... not just in South Waziristan but the security operation that has been mounted all around the country."
James Bays, Al Jazeera's correspondent in Kabul, said: "The whole building where I am shook. It's a place where we have a lot of seismic activity, a place prone to earthquakes.
"Those people who are there in the area where the quake struck will be on their own for a very long time. It is a highly mountainous area, so initial impressions are that there won't be a huge number of casualties.
"On the other hand, if it has hit a village, and there are casualties, it is going to take a very long time to get them assistance."
A 7.6-magnitude earthquake in northwest Pakistan and Kashmir in October 2005 killed 74,000 people and displaced 3.5 million others.
Source: Al Jazeera (English)