MISURATA, Libya — Libyans have puzzled for four years over what might arrest their country’s disintegration.

Feuding factions have consistently reached for guns instead of compromises in their battle to fill the vacuum left by the fall of Col. Muammar el-Qaddafi, ultimately breaking the country into two warring coalitions of militias and city-states. Leaders on both sides vowed that Libya’s only hope was their own military victory.

But now a growing number of politicians on both sides of the conflict say that the dual threats from colonies of the Islamic State and a looming collapse of the economy may finally jolt Libya out of that spiral. In a series of interviews in five Libyan cities on both sides of the fight, political leaders were for the first time trying in earnest to reverse that trend, calling for unconditional negotiations and reciprocal concessions.

“It is the realization that Libya is in danger,” said Fathi Bashaagha, a businessman who leads the pro-unity faction now ascendant in the pivotal city of Misurata, whose powerful militias have been fighting in several places around the country. “Nobody can win. We have only one way we can survive, and that is a unity government.”