Other officials, though, suggested that a direct confrontation with any of the militias would be too risky. Saleh Joudeh, a member of Congress, said the problem could not be solved “over one week.”

“You can’t come to these bodies that already exist on the ground and tell them that I want to finish you, or that I want to integrate you,” he said. “If we do that we’re fooling ourselves and we’re fooling the people.”

He said the government would seek talks with the fringe militias.

“We do not want to repeat Qaddafi’s mistakes by exporting them to other countries to fight,” he said. “They are our sons, and they are our responsibility.”

Others, though, wanted a swift and vigorous effort to end the reign of the militias, especially those led by hard-line Islamists.

“They say they are handling security, but what security do we have?” said Ashour Bentaher, a political activist in Darnah, where residents have struggled to shake the city’s reputation as a hotbed of militancy. “There are assassinations, there are bombings, kidnappings — what security?”

“We do not want to be like Somalia,” he said.

The wave of anger that had been building against the militias peaked with the attack on the American mission in Benghazi on Sept. 11. Libyan officials said that members of the Ansar al-Sharia militia were responsible.

The White House praised the Benghazi protests as a stand against extremism. They show that Libyans “are not comfortable with the voices of a few extremists and those who advocate and perpetrate violence, to drown out the voices and aspirations of the Libyan people,” said Josh Earnest, a White House spokesman.