A group of militants attacked a security checkpoint in a troubled northwestern tribal region before dawn on Friday, and eight security forces and four militants were killed, a government official said.
A government administrator, Iqbal Khan, said the attack happened in Jamrud, a main town in the Khyber tribal region bordering Afghanistan.
Khan said authorities had launched a major operation in Jamrud in an effort to find and arrest the attackers.
Also on Friday, a roadside bomb struck a vehicle carrying police in the northwestern city of Peshawar, killing an officer and wounding two others, police officer Ghaffar Khan said. He said the dead and wounded men had been transported to a hospital.
No one immediately claimed responsibility for the attacks, which came at a time when the Pakistan army is carrying out a major offensive against local and foreign militants in the country's North Waziristan tribal region.
The military says it has killed nearly 500 militants since launching the June 15 operation, while it has lost 26 soldiers.
Jamrud is 40 kilometers (25 miles) west of Peshawar, the capital of Khyber-Pakhtunkhwa province.