KABUL, Afghanistan — At least 12 people were killed on the outskirts of Kabul on Tuesday when explosives in a vehicle detonated near a convoy of security forces, Afghan officials said, and at least 12 others were wounded.

It was the deadliest of several violent attacks across Afghanistan on Tuesday that left a total of more than 30 dead, most of them members of security forces.

Basir Mujahid, a spokesman for the Kabul police, said four of those killed in the attack on the convoy were security officers and eight were civilians. “Two women and a child were among the victims,” he said.

In the northern province of Kunduz, at least 10 police officers were killed and 12 others were wounded when an elite Taliban force known as the Red Unit attacked 15 security outposts in the Chardara District, said Gul Ahmad, a police commander there.