LUIGI GUERCIA / AFP / Getty Images Broken furniture is scattered outside the U.S. consulate building in Benghazi, Libya, on Sept. 13, 2012, following an attack on the building on Sept. 11 in which Ambassador Chris Stevens was killed

Nearly four weeks after an attack in Benghazi killed the U.S. ambassador to Libya and three other Americans, politicians in Tripoli struggled to piece together a government on Monday. Fears have heightened among some in the country that, without a strong authority in the capital to glue the fractured nation together, Libya could face explosive violence from extremists and even the remnants of factions loyal to the slain dictator Muammar Gaddafi. “I predict that what’s left of the government will implode,” says Rami el-Obeidi, a former intelligence chief for the Libyan rebels during last year’s revolution, during a phone call with TIME. “If there is no central power in Tripoli there will be no safe area in the country.”

(MORE: Chris Stevens, the American Who Loved Libya)

Late Sunday night, the lawmakers of Libya’s General National Congress — voted into office last July, in the first elected parliament in 60 years — rejected an emergency Cabinet of 10 people and fired the newly installed Prime Minister Mustafa Abushagur. A dual U.S.-Libyan citizen with an engineering degree from the California Institute of Technology, Abushagur had spent weeks trying to satisfy Libya’s rival factions, many of which spent decades exiled, jailed or driven underground under Gaddafi.

Split among tribal lines, different regions and degrees of religiosity, Libya’s tapestry of tribal groups and militias had, according to Abushagur, made his task all but impossible since he was appointed Prime Minister on Sept. 12. Libyans hoped the election would bring a peaceful transition. But as Libya’s legislators cast their votes, Abushagur, who had been the Deputy Prime Minister until then, squeaked in with only a two-vote lead over his more liberal opponent, Mahmoud Jibril. The result was a scramble for Cabinet posts among competing factions, with Abushagur winning little clear mandate to govern.

Among the team he proposed on Sunday, for example, were three Deputy Prime Ministers who would each represent Libya’s South, East and West — regions separated by thousands of kilometers and each with entrenched local tribal authorities. And having failed to find a Foreign Minister who would please the various groups, Abushagur appointed himself to the role. Now out of government entirely, he went on state television on Monday, warning that the power vacuum could leave the country deeply vulnerable to violence, saying, “Libya is now facing dangerous challenges that threaten its stability and national unity.”

(MORE: Was the Benghazi Crime Scene Contaminated?)

On the face of it, there is no clear link between the political turmoil in Tripoli and the attack against the U.S. consulate in the eastern city of Benghazi on Sept. 11, which killed Ambassador Chris Stevens and three others and which is now the subject of a congressional investigation in Washington.

Yet in interviews, Libyans say the sense of drift in the capital has underscored growing concerns over insecurity in the country, as well as a suspicion that the government is not capable of cracking down on armed militias — and even perhaps is unwilling to do so, for fear of inspiring further attacks. “We haven’t seen anything from them,” says Fathi Baja, a liberal politician in Benghazi and one of the rebel leaders in last year’s revolution, speaking by phone from Benghazi. Baja, who had shared breakfast with Stevens the morning of the attack, says the government has been impotent in pursuing the culprits. “They want to show the international community that they are taking steps in pursuing these people, but they are doing nothing,” he says. “They know who is who, but they do not want to take serious steps.”

The fallout from the calamitous assault on the U.S. consulate is not the only potential for violence, however. For weeks, militia fighters who fought alongside Gaddafi in last year’s war have holed up in the former leader’s stronghold of Bani Walid, about 170 km southeast of Tripoli, threatening to create their own well-armed ministate. Libya’s fledgling national military has surrounded the town, but so far has been unable to disarm those inside. The crisis escalated after Omran Shabaan, the 22-year-old fighter believed to have killed Gaddafi in a gun battle in Sirte last Oct. 20, died in late September of wounds inflicted by pro-Gaddafi supporters, who kidnapped and tortured him over 50 days in Bani Walid.

(MORE: The Fall of Gaddafi — the End of a Long, Weird Ride)

In the aftermath of Shabaan’s death, bitter schisms have reemerged between those who fought with Gaddafi and those who waged the revolution, sparking fears that Gaddafi loyalists might choose to launch an attack on the anniversary of the leader’s death, in 12 days’ time. “The situation in Bani Walid could explode if it is not dealt with wisely,” Abushagur told Libyans last night on television.

To those who have watched Libya for years, the political turmoil has come as no surprise. Ethan Chorin, a former U.S. diplomat in Tripoli in the mid-2000s and author of a new book on last year’s revolution titled Exit the Colonel, says the country’s politicians are rived between those who support the Muslim Brotherhood — whom Abushagur had included in his Cabinet — and those who do not, like Mahmoud Jibril, who served as Prime Minister last year and whose liberal coalition was excluded from the new government. There are also divisions between the returned exiles, like Abushagur, and those who spent years living under Gaddafi, as both Baja and Jibril did. Abushagur’s status as a U.S. citizen had also become a source of suspicion among many Libyans. “All have become points of contention,” says Chorin. “The Benghazi attack has heightened the pitch of these quarrels.”