The main square in Libya's second city, Benghazi, has hosted rival demonstrations by citizens opposed to the control of militias, and by hardline Salafi protesters, with tensions still running high after an attack on the US consulate last week.
Around 30,000 Libyans marched through the eastern port city on Friday in an unprecedented effort to demand the disbanding of powerful armed militias, in the wake of the assault that killed the US ambassador and three other Americans.
The massive crowd poured into al-Kish Square Square in front of the main camp of Ansar al-Sharia militia in the city, unfurling a long Libyan flag and chanting, "With our lives and souls, we redeem you, Benghazi".
At the same time, inside the square, which was a key battleground in the uprising that overthrew dictator Muammar Gaddafi last year, around 3,000 supporters of the ultraconservative Salafist group also gathered.
Waving black Islamic flags, they chanted against a the US-made video that mocked Islam and cartoons of the Prophet Mohammed published by a French satirical weekly.
"Our demonstration is in support of the messenger of Allah and to condemn the abuse of Islam and Muslims carried out by any given country, chief among them France and the US," a member of Ansar al-Sharia told the AFP news agency.
"It wasn't enough for them to produce a film denigrating the Prophet in America, off goes France insisting on publishing cartoons in its newspaper that are offensive to our Prophet. We will never tolerate that."
The Ansar al-Sharia demonstration started around the same time that the "Save Benghazi" march organised by militia opponents headed from the Mediterranean city's Tibesti Hotel to al-Kish Square.
Organisers had called that march to demand that the central government tame the armed groups that have retained huge power since the Western-backed uprising that overthrew Gaddafi.
Al Jazeera's Hoda Abdel-Hamid, reporting from Benghazi, said: "We went there to see their slogans and basically what they're saying is that they refused insults to the Prophet but they also refuse terrorism in their city."
"They have also called for the disbanding of the militias, chanting: 'What are you waiting for?'. They're asking the government how long it will take before they do that."
They gathered to pressure the national congress to pass legislation criminalising militias and codifying the law on bearing arms, organisers said.
They were also demanding the withdrawal of all armed groups from state buildings and institutions and full support for measures to revitalise the police and army.
A standoff around the base of Rafallah Sehati, an official brigade of the ministry of defence, left 10 people wounded.
It was not immediately clear who had started the shooting.
Ismail Salabi, leader of the brigade credited with securing the nation for parliamentary elections, told Al Jazeera's Hoda Abdel-Hamid that he was shot in the leg four kilometres from the base.
Salabi, speaking to our correspondent, described the attack as an "assassination attempt".
'Lost a friend'
The chief of staff and minister of defence both hinted that the protesters were incited to storm the Rafallah Sehati base, filled with "a lot of military hardware ... and heavy weaponry" by what they described as "Gaddafi loyalists", said our correspondent.
"After what happened at the American consulate, the people of Benghazi had enough of the extremists. "
- Hassan Ahmed, demonstrator
During the march, military helicopters and fighter jets flew overhead, as police mingled in the crowd.
Protesters mourned the killing of the US envoy, waving signs that read, "The ambassador was Libya's friend" and "Libya lost a friend".
Organiser Mohammed Abujanah told AFP that Benghazi's chronic insecurity stems from the failure to disband the brigades of ex-rebels who fought in the uprising.
"We are saving Benghazi from insecurity," he said, saying the authorities were wrong to integrate the brigades into the security forces as intact units rather than disbanding them and selecting competent individuals from them.
The protest is also to reject extremism, which Abujanah described as "part of the brigades problem" and as a sign to the international community that Benghazi still needs its presence and moral support.
"Benghazi needs support now more than ever," he said.
"We have an elected body, now we need a strong army. Benghazi will regain its sparkle despite all the sad and unhappy events," Abujanah added.
Benghazi was the cradle of the revolt and reamins home to several loosely organised militias with varying degrees of ties to the interim government, some of them Islamist.
The White House for the first time Thursday described the consulate assault, which came on the anniversary of 9/11, as a "terrorist attack" that could have links to al-Qaeda.
Speaking on Air Force One, White House spokesman Jay Carney said: "It is self-evident that what happened in Benghazi was a terrorist attack."
But President Barack Obama insisted it should not be allowed to tar the reputation of all Libyans.
"I think it's important to understand that that's not representative of the attitudes of the Libyan people towards America," Obama said.