Khalifa Haftar

A Libyan man is seen last week carrying a portrait of Khalifa Haftar during a rally in Benghazi in support of the rogue former general whose forces have launched a "dignity" campaign to crush jihadist militias. (Abdullah Doma / AFP/Getty Images)

Libya is in the throes of its worst violence since the 2011 revolution, thrusting the country into a new phase of its troubled transition and posing new challenges for the United States.

A retired general, Khalifa Haftar, leading a diverse coalition of eastern tribes, former army officers and secular-leaning politicians, launched an attack against Islamist militias in Benghazi. Entire air force units and the city's charismatic special forces commander defected to his side.

The violence soon spread to Tripoli. Haftar's allies in the capital attacked the country's elected legislature, the General National Congress, demanding its closure. Tribal militias from Zintan, in western Libya, who are hostile to the Islamists, joined Haftar's forces. The Islamist-dominated congress, however, called on its militia allies from Misurata for defense.

For now, however, the country appears to have avoided full-scale civil war. The powerful Misurata militias, always a wild card, are sitting on the fence. In an apparent compromise, elections for a new legislature will be held June 25.

But a dangerous precedent has been set, as Libya drifts toward coup politics and a military takeover. And Haftar's campaign opens up profound challenges for U.S. policy, which until now has been dominated by hand-wringing over Benghazi, a focus on counter-terrorism and a commitment to building up a new Libyan army.

Libya's divisions are deep and multidimensional — the liberals-versus-Islamists narrative should not be taken at face value. In Benghazi, friends of mine speak of exhaustion and terror at the city's daily grind of violence. Others are indeed disenchanted with the

Islamist-dominated congress, which has done little to move the country forward. Haftar is seen as either a hero ridding the country of a violent scourge and setting it back (if his promises are to be believed) on a democratic path, or a strongman in waiting, like so many other Arab leaders, ready to ride to power on a populist wave.

The parallels to Egypt's Abdel Fattah Sisi are clear, although they should not be overplayed. In Benghazi in November, I heard multiple calls for a Sisi-like figure to save the country from Islamists. Haftar appears to be answering this appeal: In news statements, the gray-haired general has declared his goal to "purge" Libya of the Muslim Brotherhood and terrorists. He recently spoke on behalf of a "Supreme Military Council" whose name seems directly borrowed from Egypt. He has introduced a dangerous discourse of "cleansing" and no compromise into a country that has a history of consensus-building. The results do not bode well for Libya's stability.

The United States' focus on rebuilding the army as a response to Benghazi and a hedge against Islamist terrorism needs to be recalibrated. Today in Libya it is no longer possible to speak of an army versus militias but rather of many armies, each claiming legitimacy and authority. Even before the latest violence, a plan by the U.S. — along with Britain, Turkey, Morocco and Italy — to train what is known as a "general purpose force" was plagued with unknowns about the force's inclusivity, mission and civilian oversight. Given Libya's polarization, it could've easily ended up becoming a palace guard or the private militia of an ambitious leader such as Haftar.

What is needed now is a shift to a more holistic approach toward Libyan security. Stability is not simply about training and equipping a new army; it requires the creation of a national security council-type body, stopping under-the-table payments to militias, salary increases for the regular army and police, and other infrastructural improvements to ensure that the new force does not dissolve along factional or regional lines.

But the ultimate solution for Libya's security woes resides in the political realm — specifically, the drafting of a constitution, reform of the congress, and a broad-based national reconciliation under the auspices of the ongoing "national dialogue" process. This is an area where the United States and other outside actors can lend advice and measured assistance, but where the ultimate burden must be borne by Libyans themselves.

Most important, Washington must not turn a blind eye to the country's authoritarian drift, embodied in the figure of Haftar, regardless of any possible but uncertain short-term benefits. This would be a Faustian bargain damaging not only to Libya's long-term future but also to U.S. values and credibility.

Frederic Wehrey is a senior associate in the Middle East Program at the Carnegie Endowment for International Peace.