Violence elsewhere in the country killed 17 others, part of a spate of attacks that killed 56 people over all.
The battle in Badghis province began Friday and continued into Saturday. Afghan troops supported by international forces killed 30 militants in the Bala Murghab district, a region where the Afghan government has little control. Nine Afghan soldiers died in the battle, and four "disappeared," the Ministry of Defense said. The ministry did not elaborate.
The roadside bomb detonated on the main highway in Kunduz province, and shattered glass slightly wounded Gov. Mohammad Omar, said his spokesman, Ahmad Sami Yawar. He blamed the "enemies of peace and security," a phrase that commonly refers to militants.
Taliban and other militants often target Afghan officials. Northern Afghanistan was once thought to be a peaceful enclave unaffected by rampant Taliban violence in the country's south and east. But militants have increased attacks in the area in the last two years as the insurgency has spread across the country.
President Barack Obama is sending an additional 21,000 U.S. troops to the country this summer to bolster the roughly 40,000 already there.
In other violence, five militants were killed in an operation in the Musa Qala region of southern Helmand province on Friday, the Interior Ministry said. Six militants were killed during a battle with police in the western province of Farah on Friday, said Raouf Ahmadi, a police spokesman. Two would-be suicide attackers were shot and killed in Herat, also in the west, on Friday, he said.
In Kandahar province - the spiritual birthplace of the Taliban - a roadside bomb killed four civilians on Friday, said deputy provincial police chief Abdullah Khan. Militants lay bombs in hopes of hitting Afghan or NATO forces. But most bombs kill or wound Afghan civilians.
By Associated Press Writer Rahim Faiez