BENGHAZI, Libya (Reuters) - The head of Libya's ruling national congress warned the country was in danger because of its failure to create a cohesive national army, after a deadly attack on a U.S. consulate exposed a security vacuum.
In an interview with Reuters, Mohammed Magarief, the president of the national assembly elected in July, said the fallout from the attack could harm Libya's transition to democracy and efforts to create a strong functioning government.
"This ugly act will have grave consequences on Libya's stability and its revolution. What happened was a product of this lack of vision and chaos. This rings very powerful danger signals," said Magarief, speaking at his home in Benghazi.
"Libyans should realise their country is threatened with a grave impending danger. It's clear there are people who have an agenda that has no relation to Libya or its security and they do not think of its sovereignty or what it might face."
In Tuesday's incident, the U.S. ambassador to Libya and three other Americans were killed. The attackers were part of a crowd protesting against a film they said insulted the Prophet Mohammad.
"There were other past incidents that targeted diplomats and but they were limited and were almost forgotten because there were no victims. But the mere fact they took place in the past should have been a wake-up call for security forces to be vigilant," Magarief said.
He told CBS News on Sunday about 50 people had been arrested in connection with the Benghazi attack. Some were from abroad.
The incident should lead new Prime Minister Mustafa Abu Shagour to adopt more drastic counter-measures, he told Reuters. Abu Shagour, voted government chief this week by the congress, has said he will work "vigorously" to improve security.
"The matter now has gotten out of the hands of Libyans and this necessitates reactions that could be very dangerous," Magarief said.
Militias spearheaded the rebellion that ended Muammar Gaddafi's rule last year. While many have scaled back their activities, gone back to their hometowns or merged into national security services, others have yet to give up their arms.
Magarief, head of the 200-member assembly which will steer Libya to elections after a constitution is drafted next year, said there was a lack of political will to bring militias into the central government fold.
"Sadly I was shocked that there is no comprehensive plan based on a clear vision to build the army and security forces and the issue of gathering arms from militias," he said.
"That matters should stay like this, ambiguous and unclear, is very dangerous. There must be a political will that will deal with this matter with efficiency and forcefulness ... It's a sad situation we are in which we should get out of quickly otherwise this will have negative consequences."
Magarief said the delay in imposing rule of law and rejuvenating the economy would not only fuel growing frustration by ordinary Libyans at the slow pace of reform but would also play into the hand of foreign-inspired extremist groups.
"This revolution erupted because of injustice and deprivation - what do you expect when this continues after the revolution, when marginalisation, corruption and chaos continue?"
Magarief said the U.S. embassy attack had all the hallmarks of a pre-planned attack but it was too early to say who was behind it.
"Call it whatever you want, al Qaeda or not, what happened was an act by a group with an agenda for revenge. They chose a specific time, technique and certain victims. This is what it was all about," he said.
A spokesman for President Barack Obama said on Friday officials had no evidence the attack was pre-planned.
Immediately after the attack, U.S. officials, speaking on condition of anonymity, were quoted widely as saying they believed the attack was well-planned and organized.
Al Qaeda in the Arabian Peninsula said in a statement Tuesday's assault was partly motivated by the death of Abu Yahya al-Libi, a Libyan al Qaeda leader in Pakistan.
"Extremists are an exception in Libya and don't constitute anything significant. Libyans are inclined to moderation and readiness to coexist with each other," Magarief said.
"Libya will never become another Iraq or Somalia because Libyans have a degree of national unity and concern over their country to stand up against these forces and stand as one to protect their country, its unity, its future and revolution."
(Reporting by Suleiman Al-Khalidi; editing by Marie-Louise Gumuchian and Andrew Roche)