KHAR, Pakistan — A suicide bomber attacked a Sunni mosque in northwest Pakistan on Friday, killing at least 24 worshippers and wounding 28 others, officials said. Several children were also among those killed or wounded in the deadly attack.

A breakaway Taliban group later 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 told The Associated Press. He said rescuers had transported the dead and wounded to nearby hospitals, where some of the wounded were listed in critical condition.

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. He said the bombing took place during Friday prayers, adding that several of the wounded were in a critical condition.

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.

The White House in a statement Friday condemned the attack, saying it is an “appalling reminder that terrorism threatens all countries in the region” and said the U.S. would continue to work with the Pakistani government to fight terrorism.

Saeed Khan, in charge of the hospital in the town of Khar, said an army helicopter was being used to transport the critically wounded to Peshawar, the main city in northwestern Pakistan.

One of the wounded, 41-year-old 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 Quran and waiting for help,” he told The Associated Press from his hospital bed.

Khan said local residents and tribal police helped ferry the wounded to hospital.

No group immediately claimed responsibility for Friday’s attack, which targeted a Sunni mosque. Previous such large-scale attacks have usually targeted Shiite mosques.

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.

Pakistan’s tribal regions, which border Afghanistan, were considered to be strongholds of Pakistani Taliban militants until 2014, when the military launched a major operation there, evicting and killing large numbers of insurgents. However, violence has continued in some of the tribal regions.

Friday’s attack came hours after army chief Gen. Raheel Sharif met with Prime Minister Nawaz Sharif to discuss security issues. According to a government statement, Sharif pledged to continue the war against terrorism.

The military says some 18,000 civilians and 5,000 soldiers have been killed in militant attacks in Pakistan since the September 11, 2001 attacks in the United States, when Islamabad threw its support behind Washington in the war on terror.

____

Associated Press writers Munir Ahmed in Islamabad; Riaz Khan in Peshawar, Pakistan, and Darlene Superville in Washington contributed to this report.