insurgency now at record levels and raising alarm among Afghanistan's Western allies.
The bombing, which also left 29 people injured, was the deadliest for months in the relatively peaceful city of Herat, heightening concerns that a Taliban-led insurgency could mar presidential and provincial elections on August 20.
Taking over as NATO chief, Anders Fogh Rasmussen, vowed that the alliance would help to prevent Afghanistan once again becoming a hub of international terror and said there could be no question of rushing for the exit door.
Provincial police chief Esmatullah Alizai said the Herat blast was caused by a remotely-detonated bomb planted in a roadside rubbish bin.
"It exploded as the convoy of district police passed by," he told reporters.
"Twelve people have been killed in this explosion... among those killed are two police."
The explosion mangled police vehicles and private taxis, and smeared blood on the street, an AFP reporter saw.
Motorcycles and bicycles lay discarded with children's shoes and a woman's veil. A large election billboard was burnt and branches ripped from trees.
A woman and a girl were among the dead, Herat provincial police spokesman Noor Khan Nikzad said. Most of the dead were male passers-by.
He said 29 were wounded, including a woman, a girl and two policemen.
The police chief of nearby district Ingil was wounded but his injuries were not life-threatening, Nikzad said.
Barakatullah Mohammadi, a doctor at the city's main hospital, said 29 wounded people were admitted as well as 12 bodies.
Taliban spokesman Yousuf Ahmadi told AFP by telephone that the target was a police commander. "It was a remote-controlled roadside bomb explosion. We claim responsibility for the attack," he said.
The Islamist militia has carried out multiple bombings as part of an insurgency that is now the bloodiest since the 2001 US-led invasion replaced their regime with a Western-backed Afghan government.
The group has told Afghans to boycott the elections and ordered its fighters to block all roads a day before polling stations open.
Seventy-five foreign soldiers were killed last month, most of them in attacks, according to the independent www.icasualties.org website, making July the deadliest month for troops since the US-led invasion.
Afghan security forces are another main target for insurgents.
The interior ministry said two Afghan soldiers were killed and two others wounded when their vehicle ran over a bomb in the Taliban stronghold of Helmand province in southern Afghanistan on Sunday.
A surge in attacks has raised concerns in many of the 42 nations that contribute to the more than 100,000 NATO and US-led forces based in Afghanistan and on which the government of President Hamid Karzai relies for security.
On his first day at work, NATO's new chief Rasmussen said in Brussels that the military alliance must prevent Afghanistan from "becoming again a grand central station of international terrorism."
The former Danish prime minister said that while the alliance wanted to ultimately transfer security responsibility to the Afghan government, there could be no question of rushing for the exit door.
Karzai, who is leading a field of 41 candidates in the presidential elections, condemned the attack in Herat and said it showed that "enemies of Afghanistan" were trying to "disrupt democracy and development".
His office announced last week that a ceasefire had been reached with local Taliban in the province of Badghis, which neighbours Herat.
But violence has been spreading increasingly out of southern and eastern strongholds into parts of the west and north.
The government said eight "enemies" were killed in a clash Sunday in the northern province of Baghlan and that five "terrorists" died in another clash with Afghan troops in Helmand.