ISLAMABAD, Pakistan -- Pakistani police fought for more than 10 hours with militants they said were planning to attack the home of Prime Minister Nawaz Sharif, officials said Thursday.

An intelligence officer and two militants were killed when the shootout erupted during an overnight operation in the eastern city of Lahore, said police chief Zulfiqar Hameed. Shuja Khanzada, a provincial counterterrorism official, said the gunbattle took place at a house near Sharif's residence, which he said was the "prime target" of the militants.

Sharif was away from the residence at the time, receiving a briefing at Pakistani military headquarters on a major offensive launched against militants in the lawless northwest.

In a separate incident, a roadside bomb killed six people in the northwestern city of Hangu. Police official Abid Khan said a smaller bomb exploded first, causing no casualties, and that the larger bomb went off after bystanders had gathered at the scene.

The target of the bombs was not clear, and no one claimed responsibility for them.

Suspicion is likely to fall on Pakistani Taliban militants, who have been fighting to overthrow the government and impose their harsh brand of Islamic law on the country. The group has killed thousands of people over the last decade in a campaign of bombings and other attacks against government officials, security forces and civilians.

Since assuming office last summer, Sharif has been trying to negotiate a deal with the militants to end the decade-long violence.

But those efforts largely collapsed after militants attacked the international airport in the southern city of Karachi last month. The attack was followed by a major military operation in the North Waziristan region, a lawless tribal area that includes Taliban and other insurgent strongholds.

The Pakistani military says it has killed over 480 local and foreign militants in the operation and lost at least 26 soldiers.

Khanzada said the plot against Sharif's home was in response to the offensive. "We were expecting this. We are acting against the militant sleeper cells."

Punjab provincial law minister Rana Mashhood said intelligence had tipped off the authorities and that security forces had seized a large amount of weaponry, explosives and suicide vests.

Sharif survived an attempt on his life during a previous stint as prime minister in 1998, when militants blew up a bridge minutes before he was supposed to cross it en route to the same house in Lahore.

Associated Press writers Riaz Khan in Peshawar, Pakistan and Zaheer Babar in Lahore contributed to this report.