A suicide bomber killed at least 25 people and wounded more than 30 at a mosque in Anbar tehsil of Pakistan's Mohmand tribal region near the border with Afghanistan.
"The Friday prayer was in progress at the mosque" when the attack took place, a senior tribal official told Agence France Presse.
The suicide bomber detonated his explosives with a huge blast in a crowded mosque according to Naveed Akbar, the deputy administrator of the Mohmand Agency tribal area.
"A portion of the mosque and veranda collapsed in the blast and fell on worshippers. At least 20 people have been killed and more than 30 others wounded," he added.
Akbar said about 200 worshippers were inside the mosque at the time of attack.
Pashin Gul, the head of local tribal police, confirmed that it was a suicide attack.
Saeed Khan, the superintendent in charge of hospital in the town of Khar, said an army helicopter was being used to transport the critically wounded to Peshawar, the capital city of Khyber Pakhtunkhwa Province.
One of the wounded, 41-year-old Ghulam Khan said he heard a deafening explosion during the prayers and then he fell down. "I cried for help, but no one came to me ... there were other bodies ... wounded worshippers, who were reciting verses from Quran and waiting for help," he said from his hospital bed.
Khan said local residents and tribal police helped ferry the wounded to hospital.
Shaukat Khan, another official in the northwestern FATA region, said at least 24 people were wounded. Other officials have said that up to 35 may have been injured.
Rescue and emergency teams rushed to the blast site. The victims were shifted to nearby hospitals.
Shireen Zada, a resident who had prayed at another mosque, said he heard the blast as he was walking home.
"I rushed to the spot and when I went inside the hall there was blood and human remains everywhere and people crying out," he told AFP.
"I brought my pick-up truck, loaded three wounded and drove them to the hospital in Khar," he said, referring to the nearest town.
There was no immediate claim of responsibility, but the outlawed armed group Tehreek-i-Taliban Pakistan (TTP) routinely attacks soft targets such as courts, schools and mosques.
Mohmand Agency is one of Pakistan's seven tribal districts near the Afghan border, where armed forces have waged a war against militants for over a decade.
The Pakistani Army had launched several operations in the tribal areas, after the failure of peace talks with the TTP and an attack on Karachi airport claimed by the group in June 2014.
As a result security in the country has since improved. Scattered attacks still take place, but they are fewer and of a lesser intensity than in previous years.
According to data from the South Asia Terrorism Portal, 457 civilians and 182 security personnel were killed in Pakistan from January 1 to September 11, putting 2016 on course for fewer casualties than 2015.
Last year, the country recorded its lowest number of killings since 2007, when the TTP was formed.
On September 2 at least 14 people were killed and more than 50 wounded after a suicide bomber attacked a court in Khyber Pakhtunkhwa Province's Mardan city in an assault targeting Pakistan's legal community that was claimed by the Jamaat-ul-Ahrar faction of the TTP.
The group has also said it was behind an attack on lawyers in Balochistan province's Quetta city, which killed 73 people on August 8, as well as the Lahore Easter bombing that killed 75 in Pakistan's deadliest attack this year.
Pakistan's deadliest ever attack occurred in Peshawar in December 2014, when the TTP stormed a school and killed more than 150 people, mostly children.