Updated

A homicide bomber with a warning to spies for America taped to his leg attacked a crowded restaurant Tuesday near the Afghan border, killing at least 25 people days after a relative of the Taliban's slain commander was arrested there, officials said.

The explosion deepened instability in a country still reeling from deadly political riots over the weekend in its commercial capital, Karachi. The attack appeared unrelated to that unrest, but rather the work of an Islamic militant.

Provincial police chief Sharif Virk said the message taped to the severed leg of the bomber said spies for America would meet the same fate as those killed and included the Persian word "Khurasan" — often used in militant videos to describe Afghanistan.

The owner of the hotel restaurant, who was killed in the bombing, was an Afghan with ties to an anti-Taliban warlord, and the restaurant itself was popular with many Afghans.

Two security officials told The Associated Press that a close relative of the Taliban military commander Mullah Dadullah was arrested in the restaurant a few days before Tuesday's attack. The officials, who requested anonymity because of the sensitivity of the matter, refused to be identified.

They declined to say whether the arrest had helped the U.S. military track down Dadullah over the weekend and kill him in southern Afghanistan — one of the most senior militant leaders to die since the ouster of the Taliban regime in late 2001 for hosting Al Qaeda.

Earlier, Javed Iqbal Cheema, a top Pakistani counterterrorism official, told a news conference he did not think the bombing was linked to Dadullah and denied that Pakistan had provided any intelligence that led to his killing.

"I would only say that Dadullah was killed in Afghanistan and Pakistan did not provide any intelligence on Dadullah," he said in Islamabad.

However, a senior investigator said police were examining whether Tuesday's attack could be linked to events in Pakistan's volatile tribal regions or Afghanistan.

Hassan Khan, a waiter in the ground-floor restaurant, said he survived only because he was delivering food to guests in their rooms when the blast occurred.

"I lost my senses, and when I came round and ran to see, there were dead bodies and body parts everywhere, even out in the street," said Khan, whose clothes were stained with blood and soot.

He said the bomb went off soon after the Afghan owner of the restaurant, Saddar Uddin, had returned from a trip outside with some relatives. Uddin, his two sons and two other relatives as well as seven employees were among the dead, he said.

An intelligence official said Uddin, an ethnic Uzbek, had links to the party of the anti-Taliban warlord Abdul Rashid Dostum, part of the Northern Alliance that toppled the Taliban regime in Afghanistan with U.S. support in 2001.

Like the investigator, the intelligence official requested anonymity because he was not authorized to comment to journalists.

Cheema said 25 people were killed and 30 wounded in the bombing.

Windows of the hotel front were shattered and fans hanging from the roof were twisted. Windows were also shattered in nearby buildings. Television footage showed the bloodied bodies of victims on stretchers being bundled into waiting ambulances and then carried chaotically through the crowded corridors of nearby hospitals.

Tariq Khan, a 35-year-old jeweler with a shop on the same street, said the explosion left him in shock for several minutes.

"Then I saw dust and smoke everywhere," Khan said. "People who were injured were crying and wailing."

Peshawar has suffered periodic bomb attacks in recent years.

In January, a suicide bombing near a Shiite mosque killed 15 people and wounded more than 30, mostly police.

On April 28, a suicide attack on Pakistan's Interior Minister Aftab Khan Sherpao in the nearby town of Charsadda killed 28 people. Sherpao was slightly hurt in the blast, the latest in a series of top Pakistani officials to be targeted by militants.

Islamic militants have increasingly asserted themselves in Pakistan's frontier regions, where scores of people have been executed over the past two or three years apparently for being too aligned with the Pakistani government or America — allies in the U.S.-led war on terrorism.