ISLAMABAD, Pakistan (CNN) -- A Pakistani suicide bomber convinced security-gate guards at Islamabad police headquarters that he was delivering candy before detonating his explosives Thursday, killing himself and injuring 17 others, a police official told CNN.
The guards believed the story and allowed the attacker through the security gate. The attacker drove up a row of buildings before detonating his explosives outside the officers' residences.
Police official Mahmood Solaiman said that once allowed in, the attacker drove up outside the officers' residences before detonating his explosives. The force of the blast crumbled one side of the three-story barracks, with the victims from both inside and outside the building, Solaiman added.
The explosion occurred about six miles (10 km) from Pakistan's parliament building, where military officials were briefing lawmakers about the deteriorating security situation in the country and the ongoing military offensive to flush out extremists in the country's tribal regions.
Many of the officers who reside in the building were at the parliament grounds at the time, said Asghar Raza Gardezi, the inspector general of police in Islamabad.
Islamabad has been on edge for several weeks since a suicide truck bombing late last month at the Marriott Hotel in Islamabad killed more than 50 people and wounded more than 250 others.
Pakistan's military continues to battle militants in its tribal regions along the border with Afghanistan.
A suspected U.S. missile fired from an unmanned drone struck a village in Pakistan's tribal region, killing eight people, military sources said Thursday.
The strike happened in the village of Tapi, located in North Waziristan, around 9:30 p.m. local time (11:30 a.m ET), the sources said.
The United States is the only country operating in the region known to have the capability to launch missiles from drones, which are controlled remotely.
Pakistan has said it will not allow foreign nations to violate its sovereignty to pursue terrorists, following a U.S. ground operation last month which left several civilians dead and rankled relations between the two countries.
"We will not tolerate the violation of our sovereignty and territorial integrity by any power in the name of combating terrorism," Pakistani President Asif Ali Zardari said in mid-September in his first speech to Parliament as president.
The coalition and NATO -- based in Afghanistan -- have been seeking a way to effectively battle militants who are launching attacks from Pakistan's swath of tribal areas along the border. They have become frustrated with Islamabad over the years, saying it is not being proactive enough against militants, a claim denied by Pakistan.
A Pakistani army source said fighter jets on Thursday targeted strongholds of banned religious leader Maulana Fazlullah in Swat, a mountainous region of the frontier province that was once a popular tourist destination.
The source said 21 militants were killed in the air assault.
Fazlullah is head of Tehreek Nifaz-e-Shariat Mohammadi (TNSM), a banned hardline Islamic group. He is known as "Radio Mullah" because of his inflammatory radio broadcasts. Fazlullah has stated that his goal is to impose fundamentalist Islamic law in northwest Pakistan. Watch more about the Islamabad blast »
He took over leadership of TNSM when his father, pro-Taliban leader Sufi Mohammed, was in jail for recruiting thousands of fighters to battle U.S. forces in Afghanistan. Mohammed was released from jail earlier this year in an effort by Pakistan's new civilian government to reach a broader peace agreement with tribal leaders.
Mohammed had reportedly agreed to cooperate with the government upon his release in April after serving a six-year sentence.
Also in Pakistan's tribal region, a roadside bomb on Thursday killed seven people -- including three children -- on Thursday in the Upper Dir district of North West Frontier Province, a local police official told CNN.
The remote bomb detonated as a prisoner transport bus was taking prisoners to the Dir prison, Dir police officer Mohammad Ishfaq said.
The blast caused the prisoner bus to hit an oncoming school bus, killing three children, he said. Eleven bystanders were injured.
No one claimed responsibility for the attack, but local Dir official said it looks like it may be the work of Taliban militants.
-- CNN's Reza Sayah and Zein Basravi in Islamabad and journalist Janullah Hashimzada in Peshawar contributed to this report