Security personnel inspect the site of a suicide attack in Kabul Sept. 9, 2018, in which a man blew himself up near a convoy of gunmen commemorating the death anniversary of a famed resistance leader. (AFP/Getty Images)

Ordinary life came to a standstill in the Afghan capital on Sunday, with businesses largely shut and many people forced to stay indoors as thousands of young men brandishing knives and assault rifles took to the streets and fired indiscriminately, mostly into the air.

The chaos, which lasted for more than eight hours, further underscored the weakness of U.S.-backed President Ashraf Ghani’s government, which is locked in deep internal discord and facing rising militancy.

Meanwhile, Taliban insurgents killed dozens of security forces in various parts of the country, provincial officials said. The Associated Press, citing officials, gave a death toll of 29.

The deadliest attack was in northern Baghlan province, where the militants overran an army base after a long siege and sustained clashes. The attackers killed more than 20 people, the officials said.

The protracted gunfire in Kabul — including by masked teenagers riding in convoys of motorcycles and vehicles with tinted windows — left at least 13 people wounded, according to the Public Health Ministry.

It was part of an annual commemoration of the death anniversary of Ahmed Shah Massoud, a top anti-Taliban commander who was slain 17 years ago by suspected al-Qaeda operatives posing as journalists.

The gunmen drove at full speed from one part of the city to another on Sunday, firing various types of weapons. In some parts, the gunfire was so intense that it was reminiscent of the civil war era in Afghanistan.

Some of the young men were only children — and some were not even born — when Massoud died. Several chanted, “Long live Massoud.”

Massoud’s family and former comrades distanced themselves from the day’s events.

The gunfire subsided and some of the gunmen dispersed when a suicide bomber on a motorcycle targeted part of the convoy in a central area of Kabul.

Police reports showed that seven men in the convoy were killed and that more than 20 were wounded, but officials said the toll could rise.

Earlier in the day, security forces said they opened fire and wounded a man seeking to blow himself up in a crowd of marchers at the memorial built for Massoud close to the U.S. Embassy.

There was no immediate claim of responsibility for the reported attempt and the deadly blast, although the Islamic State has been behind such attacks in Afghanistan in recent years.

Police said they arrested scores of the marchers and seized some vehicles, actions that many dismissed as futile attempts by the government to demonstrate control of the situation.

With parliamentary polls next month and a presidential vote in April, the scenes on Sunday shocked many people.

“I think everyone has had enough,” Saad Mohseni, the chief executive of the MOBY Group who is known as Afghanistan’s media mogul, said in a tweet.

“They can commemorate at a stadium or somewhere out of the city. Kabul, a city of 5 million, cannot get hijacked because of a few hundred people,” Mohseni wrote.