At least 24 worshippers were killed when a suicide bomber attacked a Sunni mosque in north-west Pakistan on Friday, and 28 were wounded, officials said.
Several children were also among those killed or wounded in the attack.
A breakaway Taliban group claimed responsibility for the bombing.
The attacker shouted God is Great as he entered the mosque in the village of Ambar in Pakistan's Mohmand tribal region, government administrator Naveed Akbar said.
He said rescuers had taken the dead and wounded to nearby hospitals, where some of the wounded were in a critical condition.
Mr Akbar said about 200 worshippers were inside the mosque at the time of the attack.
Pashin Gul, the head of the local tribal police, confirmed that it was a suicide attack.
Ahsanullah Ahsan, a spokesman for Jamaat-ul-Ahrar, the breakaway Taliban faction, claimed responsibility for the attack in a statement to media. He claimed the attacker targeted members of a pro-government militia.
Saeed Khan, in charge of the hospital in the town of Khar, said an army helicopter was being used to take the critically wounded to Peshawar, the main city in north-western Pakistan.
One of the wounded, Ghulam Khan, 41, 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 the Koran and waiting for help," he said from his hospital bed.
The country has witnessed several large-scale militant attacks this year, claimed by an offshoot of the Pakistani Taliban and the Islamic State group. Interior minister Chaudhry Nisar Ali Khan issued a statement condemning the attack.
Friday's attack came hours after army chief General Raheel Sharif met prime minister Nawaz Sharif to discuss security issues. According to a government statement, Mr Sharif pledged to continue the war against terrorism.