The violence took place as Afghan and U.S. officials set out to try and unravel a mass of conflicting reports about the reported death of 40 civilians in a bombing incident.
Killed in the firefight were four al Qaeda suspects — all foreigners — as well as one soldier, one policeman and one Pakistani intelligence agent, officials said. The officials would not identify the suspects' nationalities.
Officials said explosives were found in the suspects' van, and bomb disposal experts were dispatched.
The incident occurred early Wednesday a checkpoint near Kohat, some 40 miles southwest of Peshawar. As the checkpoint guards approached the men's vehicle, those inside hurled grenades and opened fire.
Police and troops at the checkpoint killed three of the terrorist suspects in their vehicle, officials said. The fourth managed to get out of the vehicle and was shot dead as he tried to run away.
The suspects were coming from Wana, a remote region near the Afghan border where 10 Pakistani soldiers were killed last month in a gunbattle with more than 40 suspected al Qaeda operatives, most of them Chechens. Since that deadly incident, Pakistani troops have arrested 16 suspected al Qaeda fugitives. Earlier police had transferred seven to the prison in Kohat.
Pakistani troops, backed by U.S. intelligence, have been searching along the Afghan border looking for fugitives who sought refuge there from U.S. military operations in Afghanistan
U.S. military officials say they believe most al Qaeda men and senior Taliban officials have fled Afghanistan and are hiding in Pakistan's tribal regions. The hunt for fugitives has generated some protest by local tribesmen.
Meanwhile, anger about Monday's bombing incident grew among ordinary Afghans, a factor which could complicate the task of the U.S. military as it continues efforts to track down fugitives.
Afghanistan's government says wedding guests near the village of Deh Rawud were firing into the air - a tradition at Pashtun weddings - when they were mistakenly bombed. Many of the victims, it said, were women and children, including an entire family of 25.
The Afghan government called for more careful targeting by U.S. forces, and closer coordination with local authorities.
"The mistakes are too much," said 18-year-old Fateh Shah in Kabul.
A three-vehicle convoy of U.S. civil affairs and medical personnel was fired on as it returned from a hospital in the southern city of Kandahar on Tuesday evening, after visiting 19 wounded people brought there after the attack.
The U.S. military has not yet accepted blame for what appeared to be the worst "friendly fire" incident of its military campaign in Afghanistan and which occurred during a search in the area for fugitive Taliban leader Mullah Mohammad Omar.
Col. Roger King said a U.S. ground patrol had called in air support after feeling threatened by automatic weapons fire. Warplanes then met sustained and hostile fire from several locations around the village, including anti-aircraft fire, that was not consistent with a wedding party, he said.
"The easiest and best way to avoid civilian casualties is to avoid firing at coalition forces in the proximity of innocent civilians," he told reporters.
At the Pentagon, Marine Corps Gen. Peter Pace, vice chairman of the Joint Chiefs of Staff, said an AC-130 gunship responded to what the crew thought was anti-aircraft fire from the ground. He said the gunship - which rakes targets with 105 mm cannon and machine-guns - had attacked seven targets.
There was a also a pre-planned U.S. attack in the area that night, with B-52 bombers dropping seven 2,000-lb bombs on a cave and tunnel complex as well as on a nearby anti-aircraft position, which had fired on coalition planes in the past. One of those bombs went astray but ground spotters reported it fell on an uninhabited hillside.
U.S. President George W. Bush offered his condolences and said investigators were working to find out what had happened.