A massive earthquake struck remote and impoverished regions of northern Afghanistan and Pakistan on Monday, killing at least 263 people as it shook buildings across South Asia and knocked out power and communications to already-isolated areas.

The 7.5-magnitude quake was centred deep beneath the Hindu Kush mountains in Afghanistan's sparsely populated Badakhshan province, which borders Pakistan, Tajikistan and China, the U.S. Geological Survey said.

In the Afghan capital of Kabul, buildings shook for up to 45 seconds, walls cracked and cars rolled in the streets as electricity went out. Frightened workers who had just returned from lunch also rushed from swaying buildings in the Pakistani capital of Islamabad and to the south in the Indian capital of New Delhi.

"I was praying when the massive earthquake rattled my home. I came out in a panic," said Munir Anwar of Liaquat Pur in Pakistan's eastern Punjab province.

More casualties expected

At least 228 people were killed in Pakistan, with more than 1,000 injured, while Afghan officials reported 33 dead and more than 200 injured, and authorities in the Indian-controlled Kashmir region reported two deaths. Officials expected the casualty toll to rise as they reached the remote areas.

Authorities struggled to reach the hardest-hit areas in Afghanistan near the epicenter, located 73 kilometres south of Fayzabad, the capital of Badakhshan province.

Rescue workers carry a man who was injured during an earthquake, at the Lady Reading hospital, Peshawar, Pakistan. (Fayaz Aziz/Reuters )

Abdul Humayoon Dehqan, the head of the National Disaster Management Authority's provincial office, said he knew of only 12 dead and 20 injured in the province, mostly in collapsed buildings, and that his teams would not reach affected areas until Tuesday morning to get a better count.

Despite vast mineral deposits, Badakhshan is one of Afghanistan's poorest provinces. It is often hit by earthquakes, but casualty figures are usually low because it is so sparsely populated, with fewer than 1 million people spread across its vast mountains and valleys. It also suffers from floods, snowstorms and mudslides.

Taliban-led insurgents have used its remote valleys as cover recently to seize districts as they spread their footprint across the country. Dehqan said some districts remain under Taliban control "and we don't know how we will be able to help people in those areas."

In Takhar province, west of Badakhshan, 12 students at a girls' school were killed in a stampede as they fled shaking buildings, said Sonatullah Taimor, the spokesman for the provincial governor. Another 42 girls were taken to a hospital in the provincial capital of Taluqan.

Afghanistan's Chief Executive Abdullah Abdullah convened an emergency meeting of disaster officials and urged them to ensure that people were prepared for aftershocks. That could mean many hundreds would be forced to sleep outdoors in nighttime temperatures dropping below freezing. He instructed doctors and hospitals to be prepared to receive casualties.

President Ashraf Ghani sent condolences to those who lost relatives and property and appointed an "assessment committee" to ensure emergency relief reached the needy as soon as possible, his office said.

The U.S. said it has emergency shelters and relief supply kits stored in warehouses throughout Afghanistan that could be used.

Kashmiri young women stand outside after vacating their office buildings in Srinagar, following an earthquake Monday. An earthquake measuring 7.5 magnitude struck in northeastern Afghanistan, the U.S. Geological Survey said, sending tremors that were felt in India and Pakistan. (Danish Ismail/Reuters)

White House spokesman Josh Earnest says the U.S. government has been in touch with officials in Afghanistan and Pakistan and is ready to provide any additional support.

Pakistan Prime Minister Nawaz Sharif, who was completing a trip to the U.S., said in a televised comment from London that he planned to fly to the quake-affected region Tuesday. He called the quake a "tragedy," saying most of the casualties and damage were reported in remote areas in the country's northwest.

Pakistan's army chief, Gen. Raheel Sharif, ordered troops to the areas, the military said.

Indian Prime Minister Narendra Modi had contacted Sharif to offer help, Pakistani state-run media said. Pakistani TV said Sharif thanked Modi for the offer but provided no further details.

Helping quake victims 'top priority'

Pakistan will not issue any appeals to the international community for help as the country has the required resources to carry out the rescue and relief work, said Information Minister Pervez Rashid.

"We have enough resources to handle the situation. Our top priority is to help those affected because of the earthquake," Rashid told a news conference.

(Google Earth/CBC)

Pakistani meteorological department official Zahid Rafiq said the quake was felt across the country. As buildings in Islamabad shook, panicked residents poured into the streets, and many recited verses from the Qur'an.

Many Pakistanis recall the 7.6-magnitude earthquake of Oct. 8, 2005, that killed more than 80,000 people and left more than 3 million homeless, most in the northwest of the country and in the divided region of Kashmir.

That quake was much shallower than Monday's — 10 kilometres below the surface, compared with 213 kilometres — and thus caused greater damage, said Mohammad Hanif, an official at the Meteorological Department.

In Srinagar, the main city in the India-controlled portion of Kashmir, tremors lasted at least 40 seconds, with buildings swaying and electrical wires swinging wildly, residents said.

People ran from buildings shouting, crying and chanting religious hymns to try to keep calm.

"I thought it was the end of the world," shopkeeper Iqbal Bhat said.

Kashmir's Chief Secretary B.R. Sharma said the quake had caused limited damage, though in some areas "many houses and government buildings have developed cracks, and some have also partially collapsed."