TRIPOLI, Libya — For Judge Jamal Bennour, one of the leaders of the Libyan uprising, the day the revolution turned sour was when his friend and fellow lawyer, Abdul-Salam al-Musmari, was shot dead in front of him.

It was last July, nearly two years after the two had helped topple Col. Muammar el-Qaddafi and a year since they had left government, ceding power to the General National Congress. The two friends had lingered after Friday Prayer in their mosque in Benghazi, and were walking home when a man leaned out of a passing four-wheel-drive car and shot Mr. Musmari in the chest. “It was just a moment,” his friend said. “We lost Abdul-Salam. It was very hard.”

Libya has suffered widespread bloodletting in the aftermath of the 2011 revolution. Over 1,200 people have been killed nationwide in the last two years, victims of revenge, power clashes and spiraling crime.

Political divisions within the elected General National Congress, with groups backed by rival militias, have rendered the appointed government almost powerless. The power struggle kept Prime Minister Ali Zeidan under threat of dismissal for months before he was voted out of office on Tuesday, and left the country without an interior minister since August, when the last one resigned.