On Sunday, the Islamic State released a video showing the beheadings of 21 Christian Egyptians in a stretch of land near Tripoli, Libya. The recording—narrated by a fighter speaking English with a North American accent, is similar to many other gruesome videos that the group has released. But the setting of the attack—Libya—represents two disturbing trends in the Middle East. One is that ISIS's reach now extends thousands of miles from its base in Iraq and Syria. The other is that Libya—the one-time stronghold of dictator Muammar al-Qaddafi—is now arguably worse off than ever.

Sunday's massacre occurred four years to the month after anti-government protests in Benghazi, Libya's second-largest city, sparked a nationwide uprising that brought down Qaddafi. The United States, which intervened on the side of anti-Qaddafi forces along with France and the U.K., reacted to the fall of the regime with optimism. Speaking in the Rose Garden after the dictator's death in August 2011, President Obama said that Qaddafi's beleaguered subjects now had an "opportunity to determine their own destiny in a new and democratic Libya.”

Less than four years later, Libya now exists in name only. The country is effectively divided into western and eastern halves, each governed by a militia comprised of a loose coalition of forces. Both sides claim legitimacy over the country as a whole. But the top United Nations envoy in the country, Bernardino Leon, is not optimistic the two will soon reconcile.

"Libya is falling apart," he said. "Politically, financially, the economic situation is disastrous."

Enter ISIS. As in Iraq and Syria, the organization has filled a vacuum in Libya left by the dissolution of the state. The murder of the Egyptians—who were likely lured west by the prospect of work in Libya's oil fields—could destabilize the region as a whole. On Monday, Egyptian President Fattah el-Sisi launched retaliatory air strikes against ISIS holdings in Derna, a city in northeast Libya, killing an estimated 40 to 50 people. el-Sisi is allied with Libya's Dignity militia, which controls the country's east, while Turkey and Qatar support Libya Dawn, the movement that governs the west.

Since Obama's optimistic Rose Garden declaration, U.S. enthusiasm for intervening in Libya has waned. In 2012, Ambassador J. Christopher Stevens and three other Americans were killed in an attack on the U.S. consular compound in Benghazi, an event that soon stoked controversy in Washington. Congressional Republicans accused the Obama Administration of failing to provide adequate security as well as orchestrating a cover-up, a charge the White House denied. But the damage to Obama's Libya policy was done.

"Because of the politicization of that episode in the U.S., the government paused to make sure no one else got hurt, and reduced our geographic scope and presence in the country," a senior administration official told the New Yorker's Jon Lee Anderson.

Would Libya been better off had NATO not intervened in the first place? As with any counterfactual, it's impossible to prove. Critics of the invasion, like the journalist Glenn Greenwald, have argued that the war accomplished nothing but empower "an endless generation of [American] enemies." But Benjamin Rhodes, a deputy national security advisor who supported the invasion, disagrees. He told the New Yorker's Anderson that "if Qaddafi had gone into Benghazi, I think Libya would look more like Syria today."

Four years after the first hopeful protests against Qaddafi, Libya is now divided, lawless, a haven for extremists, and a country unable to capitalize on its vast oil wealth. In a sense, Rhodes is right—Libya doesn't look like Syria today. But it's sure beginning to look a lot like Iraq.