(AFP) - At least 54 people were killed Friday in a suicide bombing at a mosque in northwest Pakistan targeting a former interior minister and close ally of President Pervez Musharraf .
The bomber blew himself up in a crowded mosque at the residential compound of Aftab Sherpao , an outspoken opponent of Islamic militancy who until last month was the top civilian anti-terrorism official.
Sherpao was reportedly unhurt in the attack, which hit as the mosque was crowded with Muslim faithful celebrating the first day of the Islamic holiday of Eid al- Adha .
The carnage raised the spectre of a bloody run-up to controversial national elections on January 8, with Musharraf -- a pivotal figure in the US-led "war on terror" -- battling to contain Taliban and Al-Qaeda-linked militants.
The president condemned the "distorted thinking" of the militants and ordered the security and intelligence agencies to "track down the masterminds behind this abhorrent act," the official Associated Press of Pakistan said.
"Fifty-four people were killed," district police chief Feroz Shah told AFP. He said the attacker was believed to have been carrying six to seven kilograms (13 to 15 pounds) of explosives.
The wounded were shifted to hospitals in Charshadda , the town where the attack occurred, and the nearby provincial capital Peshawar.
It was the deadliest attack in Pakistan since October, when twin suicide bombings killed 139 people at a parade in honour of opposition leader Benazir Bhutto.
Friday's blast ripped the limbs off worshippers and spattered the mosque with blood and pieces of flesh. Doors and windows of the mosque were smashed by the impact.
"I lost my two brothers," said Jehangir Khan, fighting back tears as wails of mourning and the sounds of sirens reverberated across the site. He said he had helped retrieve six bodies of children.
Another witness, Jangrez Khan, said the bomber detonated as the prayer leader said " Allahu Akbar ," or God is Greatest.
It was not immediately known how the blast missed Sherpao , who as interior minister had command of the country's paramilitary forces and was in effect the public face of the government's fight against Islamic militants.
"Naturally, Aftab Sherpao was the target," his spokesman Salim Shah told AFP. Officials said one of his sons was wounded and taken to hospital.
Musharraf dissolved his cabinet in November and appointed new ministers under a caretaker government ahead of the January elections for parliament.
Until then, however, Sherpao was the leading civilian in the government campaign to clamp down on the militant attacks that have threatened to destabilise this nuclear-armed Islamic nation of 160 million people.
Sherpao was slightly wounded in an April suicide bombing, just after delivering a speech at a public rally.
More than 750 people have been killed in militant attacks this year -- and more than half of those since July, when the army raided a radical, pro-Taliban mosque in the capital Islamabad, killing 100 people.
UN Secretary General Ban Ki -moon late Friday condemned "this act of terrorism carried out at a house of worship" and urged all political forces in Pakistan "to unite against the scourge of terrorism and to act together to create a peaceful environment" ahead of next month's elections.
The latest suicide attack was the fourth to hit Pakistan since just last Friday, a day before Musharraf lifted a controversial state of emergency.
Musharraf cited the threat of Islamist violence when he imposed emergency rule on November 3. But in a speech to the nation after he lifted the emergency last Saturday, he said the threat had been contained.
"The wave of terrorism and militancy has been stopped under the emergency and there has been considerable improvement in the overall situation," Musharraf said.