A suicide bomber blew himself up at the entrance to a busy market in the main town of northwest Pakistan's Swat district on Saturday, killing two people and wounding 10 others, police said.
Two bombers tried to launch the attack in Mingora, but police said security forces shot dead one before he could detonate his explosives.
"It was a suicide attack," Qazi Jamil, the police chief for the northwestern Malakand region to which Swat belongs, told AFP in a message.
"One was shot dead while the other exploded himself. A total of 10 people were injured and two were killed. Among the injured, three are critical," he added.
Police said that a gunfight also took place before the suicide attack.
"We arrested three militants from a car in the morning, other militants hiding somewhere in the market started firing on security forces injuring two paramilitary personnel," Jamil told AFP, adding that troops returned fire and arrested another militant wounded in the firefight.
Troops launched a search operation after the shooting and tried to arrest the two would-be suicide bombers in the nearby market but one managed to detonate his suicide vest after his companion was shot dead by troops.
Eight shops were also badly damaged in the blast, he added.
Ghulam Farooq, Mingora police chief, confirmed the death toll, speaking to AFP by telephone from the mountainous district, about 125 kilometres (80 miles) northwest of Islamabad.
For two years the Taliban paralysed much of the Swat valley by promoting a repressive brand of Islamic law, opposing secular girls' education and beheading opponents until the government ordered in thousands of troops.
Following a major military offensive launched last April in the neighbouring districts of Buner, Lower Dir and then Swat on May 8, 2009, Pakistan declared that the mountain region was back under army control.
Many of the estimated two million people who fled last year have now returned to their homes in and around Swat and are trying to rebuild their lives, but skirmishes, threats and tensions have remained.
Saturday's bomb was the first in Mingora since a suicide attacker killed nine people in the city on February 22.
Suicide and bomb attacks blamed on Taliban and Al-Qaeda-linked militants have killed nearly 3,300 people since July 2007 across nuclear-armed Pakistan, and last year killed more civilians than in war-ravaged Afghanistan.
In southwestern Pakistan, which is also troubled by Islamist militants, separatist unrest and sectarian violence, a tricycle bomb exploded in the main city of Quetta, wounding six people, officials said.
The remote-controlled bomb exploded when a police van passed by in the Saryab neighbourhood, police said.
Four policemen and two pedestrians were among the injured, they added.
Quetta is the capital of oil and gas-rich Baluchistan province, which borders Iran and Afghanistan.
There was no immediate claim of responsibility, but similar bombings have been blamed on separatist, secular tribal rebels in Baluchistan.
In another incident, a remote control low intensity bomb blast late Friday wounded three people in Karachi, the economic hub of Pakistan, police said.

Copyright 2010 AFP South Asian Edition