Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

PESHAWAR, Pakistan — The powerful earthquake that killed hundreds of people across Afghanistan and Pakistan was a "warning" from God, according to a religious education group.

Wafaq-ul-Madaris-e-Arabia, Pakistan's largest federation of seminaries in the Deobandi school of Islam, also said it was pleased at an uptick in mosque attendance following the quake because "collective repentance is the need of the hour," Pakistan's Express Tribune newspaper reported.

Rescue workers carry a man injured by Monday's earthquake to a hospital in Peshawar, Pakistan. FAYAZ AZIZ / Reuters

The magnitude-7.5 quake struck a remote, mountainous region of northeast Afghanistan on Tuesday, but most of the deaths and injuries were in neighboring Pakistan. It triggered landslides, damaged thousands of homes, and rocked cities up to 400 miles away.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Although the earthquake was powerful, it struck deep beneath the Hindu Kush mountains, meaning the damage was significantly less than a similar quake in 2005 that killed some 86,000 people.

"Allah Almighty has protected Pakistan of major harm and disaster. The people should offer special prayers giving thanks," said the statement. It was issued by the Hanif Jalandhary, the general secretary of Wafaq-ul-Madaris-e-Arabia, was well as several other religious scholars, according to The Express Tribune.

Meanwhile, the Taliban urged aid agencies on Tuesday not to hold back delivering supplies to areas of Afghanistan affected by the tremor.

A house damaged by the earthquake in Mingora, Pakistan. Naveed Ali / AP

The Islamist militants hold de facto control over some areas rescuers have been struggling to reach. The Taliban said in a statement it had instructed its militants to lend their "complete help" to the recovery effort.

"The [Taliban] calls on our good-willed countrymen and charitable organizations to not hold back in providing shelter, food and medical supplies to the victims of this earthquake," the statement said. "And it similarly orders its mujahideen in the affected areas to lend their complete help to the victims and facilitate those giving charity to the needy."

The earthquake also prompted no halt in the perilous security situation on the Afghan-Pakistan border.

Seven Pakistani soldiers were killed in the country's Paktika province after a group of militants opened fire from the Afghan side of the border on Tuesday, a senior Pakistani military official told NBC News.