Khalifa Haftar’s army now controls much of the eastern half of the country. Photograph by Gabriele Micalizzi / Cesura

Early last year, General Khalifa Haftar left his home in northern Virginia—where he had spent most of the previous two decades, at least some of that time working with the Central Intelligence Agency—and returned to Tripoli to fight his latest war for control of Libya. Haftar, who is a mild-looking man in his early seventies, has fought with and against nearly every significant faction in the country’s conflicts, leading to a reputation for unrivalled military experience and for a highly flexible sense of personal allegiance. In the Green Mountains, the country’s traditional hideout for rebels and insurgents, he established a military headquarters, inside an old airbase surrounded by red-earth farmland and groves of hazelnut and olive trees. Haftar’s force, which he calls the Libyan National Army, has taken much of the eastern half of the country, in an offensive known as Operation Dignity. Most of the remainder, including the capital city of Tripoli, is held by Libya Dawn, a loose coalition of militias, many of them working in a tactical alliance with Islamist extremists. Much as General Abdel Fattah el-Sisi has boasted of doing in Egypt, General Haftar proposes to destroy the Islamist forces and bring peace and stability—enforced by his own army.

When I visited Haftar’s base, earlier this winter, I passed a Russian-made helicopter gunship and was greeted by a group of fighters unloading ammo. The base was in a state of constant alert. Haftar is a top-priority assassination target for Libya Dawn’s militias. Last June, a suicide bomber exploded a Jeep outside his home near Benghazi, killing four guards but missing the primary target. Now there is heavy security around Haftar at all times. At his base, soldiers frisk visitors and confiscate weapons. A few months ago, someone reportedly attempted to kill him with an explosive device concealed in a phone, and so his men collect phones, too.

Haftar greeted me in a spotless office with a set of beige sofas and a matching carpet. Wearing an old-fashioned regimental mustache and a crisp khaki uniform, he looks more like a retired schoolteacher than like the American-backed tyrant his enemies describe. In a deliberate voice, he told me why he had gone back to war. After participating in the 2011 uprising against Muammar Qaddafi, he tried to find a place for himself in Libya’s new politics. When he didn’t succeed, he said, he went home to Virginia for a time, “to enjoy my grandchildren.” All the while, he watched as Libya floundered under a succession of weak governments, and the country’s militias grew more powerful. Last summer, Islamist extremists moved to seize Benghazi; in a merciless campaign aimed at the remains of civil society, assassins killed some two hundred and seventy lawyers, judges, activists, military officers, and policemen—including some of Haftar’s old friends and military colleagues. “There was no justice and no protection,” he said. “People no longer left their houses at night. All of this upset me greatly. We had no sooner left behind Qaddafi’s rule than we had this?”

Haftar reached out to contacts in what remained of Libya’s armed forces, in civil society, in tribal groups, and, finally, in Tripoli. “Everyone told me the same thing,” he said. “ ‘We are looking for a savior. Where are you?’ I told them, ‘If I have the approval of the people, I will act.’ After popular demonstrations took place all over Libya asking me to step in, I knew I was being pushed toward death, but I willingly accepted.”

Like many self-appointed saviors, Haftar spoke with a certain self-admiring fatalism. But his history is much more complex than he cares to acknowledge. As an Army cadet in 1969, he participated in Qaddafi’s coup against the Libyan monarchy, and eventually became one of his top officers. “He was my son,” Qaddafi once told an interviewer, “and I was like his spiritual father.”

In 1987, as Libya fought with Chad over a strategic strip of borderland, Qaddafi chose Haftar as his commanding officer. Haftar’s base was soon overrun in a Chadian attack—part of a conflict that became known as the Toyota War, for the Land Cruisers that Chad’s troops drove into battle. The Chadians killed thousands of Libyan troops, and took Haftar and four hundred of his men prisoner. When Qaddafi publicly disavowed the P.O.W.s, Haftar was enraged, and called for his men to join him in a coup. By 1988, he had aligned himself with the National Front for the Salvation of Libya, a Chad-based opposition group supported by the C.I.A. Soon afterward, he was released from prison.

Haftar’s work in Chad did not bring him glory. His enemies like to recall that Chad’s government accused the Libyan forces of employing napalm and poison gas during the war. Afterward, two of Haftar’s fellow-prisoners reported that those who refused to join his coup were left behind in their jail cells. As military commander of the Salvation Front, he plotted an invasion of Libya—but Qaddafi outflanked him, backing a disruptive coup in Chad. The C.I.A. had to airlift Haftar and three hundred and fifty of his men to Zaire and, eventually, to the United States. Haftar was given citizenship, and remained in the U.S. for the next twenty years.

For a time, Haftar stayed involved with the C.I.A., and with the Salvation Front’s abortive efforts to topple Qaddafi, including a plot in which a number of Haftar’s fellow-conspirators were captured and executed. According to Ashur Shamis, a former leader of the Salvation Front, Haftar lived well in Virginia, though no one knew how he made his money. But he did not return to Libya, fearing that he would be executed.

After the U.S. invaded Iraq, in 2003, Qaddafi, who had been among America’s most vitriolic enemies, suddenly agreed to give up his nuclear-weapons program and attempt a rapprochement. By then, the C.I.A. had evidently loosened its ties with Haftar, and, when he returned to Libya, in March, 2011, he was on his own. Nevertheless, Haftar’s enemies accuse him of being a C.I.A. plant, a traitor, and a vicious killer, and of seeking to install himself as a latter-day Qaddafi.

There is no overstating the chaos of post-Qaddafi Libya. Two competing governments claim legitimacy. Armed militias roam the streets. The electricity is frequently out of service, and most business is at a standstill; revenues from oil, the country’s greatest asset, have dwindled by more than ninety per cent. Some three thousand people have been killed by fighting in the past year, and nearly a third of the country’s population has fled across the border to Tunisia. What has followed the downfall of a tyrant—a downfall encouraged by NATO air strikes—is the tyranny of a dangerous and pervasive instability.

For Haftar, the east was the obvious place to begin his offensive. “Benghazi was the main stronghold of terrorism in Libya, so we started there,” he said. An old Libyan maxim holds that everything of importance happens in Benghazi. In 1937, Benito Mussolini came there to solidify his colonial power. In 1951, the newly crowned King Idris I broadcast a radio address from the city to proclaim Libya independent. When Qaddafi launched his military coup against the monarchy, he was a young officer based in Benghazi. In February, 2011, the uprising against his rule erupted there, and the following month the West intervened there to prevent him from massacring the city’s revolutionaries and its civilian population.