Afghan security officers arrive at the scene of a protest against caricatures of the prophet Muhammad published in the French magazine Charlie Hebdo, in Kabul, Afghanistan on Saturday, Jan. 31, 2015. (Rahmat Gul/AP)

Police clashed with protesters at a demonstration here Saturday against the French satirical newsweekly Charlie Hebdo, injuring at least two dozen people, said Afghan police officials and witnesses.

Since the Jan. 7 attack by gunmen on Charlie Hebdo’s offices in Paris that killed 12 people, small demonstrations have continued in the Afghan capital and other parts of the country, denouncing the weekly’s publication of caricatures of the prophet Muhammad.

But Saturday’s protest, involving gunfire and rock-throwing youths, was believed to be the first that turned violent. At least 17 policemen and seven protesters suffered injuries after armed men among the demonstrators opened fire, said Kabul police spokesman Hashmatullah Stanikzai. Five protesters were arrested, he said.

The clashes erupted about 1 p.m. after police blocked several hundred protesters as they marched down Kabul-Jalalabad, a main thoroughfare in the eastern part of the city where a large number of attacks have targeted foreigners in recent months. The protesters clutched white banners that read “Down with France, down with infidels. Muhammad, our prophet, is beloved to me.” Some chanted “Allah Akbar” — God is Great. The highway remained closed for several hours as protesters set fire to tires, as well as a traffic police booth, witnesses said.

While police officials claimed they were fired upon first, some witnesses said it was the police who fired upon the demonstrators after protesters began moving menacingly toward the officers.

“The angry protesters were running toward policemen,” said Ahmad Ravi Naseri, 25, a shopkeeper. “There were mostly young boys, throwing stones at the policemen. The policemen were running away from the protesters, but then other policemen opened fire at the protesters.”

Some demonstrators and witnesses said that two protesters were killed, but police officials said there were no deaths.

Tensions grew in many parts of the Muslim world after Charlie Hebdo’s first issue following the attacks ran a cartoon on its cover depicting the prophet clutching a sign that read “Je suis Charlie” and weeping a single tear. Many Muslims saw that as a provocation, including Afghan President Ashraf Ghani, who described the cartoon as insulting to Islam. Protests have erupted in other majority-Muslim nations, including Pakistan and Niger, even as the slogan “Je suis Charlie” was embraced by many as a show of solidarity with the weekly and support of freedom of speech.

Al-Qaeda in the Arabian Peninsula, the terrorist network’s Yemen branch, claimed responsibility for the attack.

Nangialay Hotak, who was among the demonstrators Saturday, said protesters were motivated to stage the rally after they heard preachers denounce Charlie Hebdo during prayers at their mosque Friday. They were given slogans to chant and ordered to march to the French Embassy to condemn the weekly in a peaceful demonstration.

“The holy prophet Muhammad is our leader and the Koran is our law,” said Hotak, 35, a driver by profession. “Being a Muslim I have to defend the holy prophet and the holy Koran.”

After nearly three hours, the protesters dispersed when a community leader arrived and urged them to leave, saying that if they left, the police would release the protesters they had arrested, witnesses said.

“I support the holy prophet Muhammad, too,” Bawar Hotak, who heads an Afghan body builders association, told the crowd. “If I was aware of your protest, I would have guided it, and it would have been a peaceful protest. You people didn’t know that there were some protesters among you who wanted to defame our people. That’s why they turned the protest to violence.

“For the sake of God, please end the protest and unblock the highway, and I will ask the district police chief to release the arrested protesters.”

A few minutes later, traffic began to move again.