BAGHLAN-E-MARKAZI, Afghanistan — In a chaotic day of violence throughout Afghanistan, scores of police officers, soldiers and civilians were killed by insurgents who, in four separate attacks, overran a major military base, killed a police chief, destroyed a police post and bombed a memorial event.

In the capital, Kabul, a commemoration for a man some Afghans regard as a hero turned violent as suicide bombers attacked celebrants, killing seven, and the police arrested more than 100 mourners for shooting in the air.

The deadliest single episode was the destruction by Taliban insurgents of an army base in Baghlan Province on Sunday, with at least 22 and as many as 40 security force members killed, local officials said.

The military installation was the second major base to fall to the insurgents in Baghlan Province in the past month, and the third in northern Afghanistan during the same period.