A boy stands on the rubble of houses in Kohat, Pakistan

Rescuers were Tuesday picking their way through rugged terrain and pockets of Taliban insurgency in the search for survivors after a massive quake hit Pakistan and Afghanistan, killing at least 277 people.

The toll was expected to rise as search teams reach remote areas that were cut off by the powerful 7.5 magnitude quake, which triggered landslides and stampedes as it toppled buildings and severed communication lines.

Pakistan's military has been mobilised and India -- whose relationship with Islamabad is often prickly -- said it stood ready to help.

In the most horrifying episode to emerge so far from the quake, 12 young Afghan girls were crushed to death in a stampede as they tried to flee their shaking school building.

The bulk of the casualties were reported from Pakistan, where 214 people were killed and more than 1,800 injured, disaster management authorities said.

"Many houses and buildings have collapsed in the city," said Arbab Muhammad Asim, district mayor for the northwestern city of Peshawar.

Many people were trapped under piles of rubble, with officials warning that the toll was set to rise.

"The building was swinging like a pendulum, it felt as if the heavens would fall," Peshawar shop owner Tufail Ahmed told AFP.

Afghan officials said at least 63 people were confirmed dead and hundreds more injured, with casualties reported from around half a dozen of the country's 34 provinces.

The government has implored aid agencies for assistance.

But large swathes of Badakhshan, the remote province where the epicentre is located, and other areas are effectively controlled by the Taliban, posing a huge challenge to any official aid efforts.

"Today's earthquake was the strongest one felt in the recent decades," said Afghanistan's chief executive Abdullah Abdullah.

"Initial reports show a big loss of life and huge financial losses in Badakhshan, Takhar, Nangarhar, Kunar and other regions. Exact numbers are not known because phone lines are down and communication has been cut off in many areas."

- 'The could not even talk' -

In remote northern Takhar, a dozen Afghan schoolgirls, all under 16, were trampled to death as they rushed to escape their classrooms when the quake struck.

Bystanders rushed the dazed and terrified survivors to hospital, many lying limp in the arms of their rescuers, as doctors tried reviving some of them by pumping their chests.

"When the relatives of the dead students came to collect their bodies, they were so distressed that they could not even talk to authorities to record their names," said Hafizullah Safai, head of the Takhar health department.

The quake was centred near Jurm in northeast Afghanistan, 250 kilometres (160 miles) from the capital Kabul and at a depth of 213.5 kilometres, the US Geological Survey said.

The quake, which lasted at least one minute, shook buildings in Afghanistan, Pakistan and India, sending thousands of frightened people rushing into the streets.

It was also felt in Tajikstan, Kyrgyzstan and Uzbekistan.

Live footage from an Afghan news broadcast filmed in Kabul showed the anchor abandoning his desk as the quake shook the cameras.

Restaurants and office buildings emptied in Islamabad, with cracks appearing in some buildings but no major damage reported.

Hundreds of people in northern India poured onto the streets from office blocks, hospitals and homes.

In Delhi -- more than 1,000 kilometres from the epicentre -- the metro ground to a halt during the tremor.

Indian Prime Minister Narendra Modi took to Twitter immediately after the quake, saying that India stood ready to assist, including in Afghanistan and Pakistan if required.

Pakistan mobilised troops and all military hospitals were put on high alert, army spokesman Lieutenant General Asim Bajwa said, with the air force also offering support.

Afghanistan is frequently hit by earthquakes, especially in the Hindu Kush mountain range, which lies near the junction of the Eurasian and Indian tectonic plates.

The epicentre of Monday's quake was just a few hundred kilometres from the site of a 7.6 magnitude quake that struck in October 2005, killing more than 75,000 people and displacing some 3.5 million more, although that quake was much shallower.

In Nepal twin quakes in May killed more than 8,900 people, triggered landslides and destroyed half a million homes.
Source: AFP