A magnitude 6.4 earthquake has rattled much of Pakistan and parts of neighbouring Afghanistan, sending panicked residents fleeing from homes and offices and frightening people in remote villages, Pakistani officials and the US Geological Survey (USGS) said.

The epicentre was in the Hindu Kuch mountain range in Afghanistan, according to the Pakistan Meteorological Department.

It was 27.9 miles from Jurm village in northeastern Afghanistan and centred at a depth of 128 miles, the USGS said.

There were no immediate reports of damage in either country.

The temblor was felt in Pakistan’s capital, Islamabad, and in the major cities of Lahore, Peshawar and Muzaffarabad in the Pakistan-administered, disputed Himalayan region of Kashmir, which is divided between Pakistan and India and claimed by both in its entirety.

Sahiba Bibi, a woman who lives on the outskirts of Islamabad, said she was preparing for prayers when she suddenly felt the ground shaking.

“We quickly came out of our home and we saw some other people also standing outside their houses,” she said.

Residents in the northwestern city of Peshawar also said they went out of their homes and offices after feeling the earthquake.

“I knew that it should not be less than magnitude six when I felt the earthquake as we have felt strong earthquakes in the past,” said Mohammad Khan, 65, in Peshawar, the capital of Khyber Pakhtunkhwa province bordering Afghanistan.

Bilal Faizi, a spokesman for Pakistan’s emergency services in the northwest, said police and rescue officials were ordered to alert the emergency services about any damage caused by the earthquake.

“So far, there has been no reported damage from the earthquake, though the earthquake was so strong that it terrified many people who came out of their offices and houses in Peshawar and elsewhere in Khyber Pakhtunkhwa province,” he said.

Authorities in Pakistan-administered Kashmir said the earthquake caused no damage but some panicked people came out of their homes and offices protectively.

Pakistan and the region, which sits along an active continental plate boundary, are often hit by earthquakes.

A magnitude 7.6 quake in 2005 killed thousands of people in Pakistan and Kashmir.