Taliban leaders in Afghanistan promised Tuesday not to interfere with relief efforts in the wake of a devastating earthquake, but a deadly clash along the border with Pakistan underscored the challenges facing both countries as they struggle to assess quake damage.

A day after the 7.5-magnitude temblor struck Afghanistan and Pakistan, the death toll continued to rise as rescue workers began reaching remote areas of the border region. More than 350 people had been killed, officials said. The quake also triggered landslides and damaged or destroyed at least 15,000 houses, many made of stone and mud.

Despite the damage, officials in both countries said the death and destruction could have been far worse. The earthquake occurred at a depth of more than 125 miles, which helped to shield well-constructed buildings from its full force. Most major population ­centers, including Kabul and Islamabad, suffered no significant ­damage.

“It’s our good luck that despite such a huge quake, the damage is not that great,” said Maj. Gen. Asghar Nawaz, chairman of Pakistan’s National Disaster Management Authority. “Had it been a shallow quake, the losses could have been much higher.”

But the earthquake destroyed dozens of mountainside villages on both sides of the volatile border, presenting unique challenges for rescue officials. With the winter’s first snow already covering some hard-hit areas, there were mounting concerns about a grave humanitarian crisis — possibly complicated by the presence of Taliban militants, who control some areas in the quake zone.

On Tuesday afternoon, the Taliban called on its fighters to respect international relief efforts in Afghanistan.

“[We] call on our good-willed countrymen and charitable organizations not to hold back in providing shelter, food and medical supplies to the victims,” the Islamist militant group said in a statement on its Web site, adding that its fighters also should help the efforts.

Such cooperation would mark a rare truce by the Taliban, which has recently stepped up offensives in Afghanistan, including taking temporary control of the key northern city of Kunduz earlier this month.

The security issues facing both countries, however, quickly became apparent. The Pakistani army announced that seven soldiers were killed in South Waziristan near the Afghan border on Tuesday. According to the army, a mortar round fired from Afghanistan landed at a checkpoint along the border.

The new pledge comes from the Afghan Taliban and covers only Afghanistan. The Pakistani Taliban, whose leadership is widely suspected to reside in Afghanistan, is loosely affiliated with the Afghan Taliban but claims to operate independently.

Islamic State militants also have been trying to gain a foothold in some eastern Afghan provinces, compounding the security threat.

The massive earthquake that rocked northeastern Afghanistan triggered landslides in neighboring Pakistan. (Facebook/Mubashir Balti)

“Afghan defense and security forces will try their best to ensure the safety of the people and the foundations who are working in relief,” Sayed Zafar Hashemi, a spokesman for Afghan President Ashraf Ghani, said at a news conference Tuesday evening.

The earthquake killed at least 115 people in Afghanistan and damaged more than 7,600 homes across nine provinces, Ghani said in a statement. Hundreds of traditional mud houses were damaged or destroyed in a landslide in Konar province, according to the Afghanistan National Disaster Management Authority.

The death toll remains far higher in Pakistan, where at least 248 people have been killed, according to that country’s NDMA.

In the Chitral Valley of Pakistan’s Khyber Pakhtunkhwa province, officials said at least 1,486 houses had been damaged or destroyed.

“We are taking shelter in relatives’ homes, and there is very little left for us to eat,” one resident, Muhammad Omar, said in a telephone interview.

Officials said 5,000 houses were damaged or had collapsed in the hilly terrain of the Swat Valley and the Upper Dir area of the province.

“It’s been a hard day for us as many spent the night sleeping with others or out in the open,” said Azimullah Khan, 33, from the Malakand area. “Shelter, food and medicines are immediately needed.”

But Pakistani leaders said late Tuesday that the army and government agencies had the situation under control.

Information Minister Pervaiz Rashid said Pakistan did not need any assistance from other nations or international relief groups. Rashid also said that charitable groups with ties to hard-line Islamist organizations would not be allowed to participate in the relief effort.

After an earthquake in 2005 killed 70,000 to 80,000 people in northern Pakistan, the charitable arm of Lashkar-e-Taiba, a banned militant group, set up field hospitals and food pantries to help victims.

“Pakistan will not allow the banned outfits to come out and do their assistance programs and, under that guise, spread their false and poisonous message,” Rashid said.

Besides the major cities, several Pakistani tourist areas — some near towering mountains — also appear to have escaped the earthquake with relatively little damage.

“It was a terrible jolt, and I never felt a jolt like that,” said Riazullah Baig, a resident of the Hunza Valley in the far-northern part of the country. “But everything seems fine besides the roads, which are blocked.”

In Pakistan’s Gilgit-Baltistan region, at least 10 people were killed, according to Manzar Shigri, a local journalist. Six of them were crushed by a boulder while they were riding on a bus, he said.

“Even today, a day after the earthquake, there are not many people on the roads because of the fear of landslides,” Shigri said.

Salahuddin reported from Kabul. Aamir Iqbal and Haq Nawaz Khan in Peshawar, Pakistan, Shaiq Hussain in Islamabad and Mohammad Sharif in Kabul contributed to this report.

Read more:

After Kunduz, Taliban is now targeting other Afghan cities

The Islamic State is making these Afghans long for the Taliban

Afghan forces straining to keep the Taliban at bay