Peter Bergen is a CNN national security analyst, a vice president at New America and a professor of practice at Arizona State University. He is writing a book for Penguin Random House about the national security decision-making of the Trump administration. Alyssa Sims is a policy analyst with the International Security Program at New America. The opinions expressed in this commentary are their own.

(CNN) Years after then President Barack Obama made what he has described as his worst mistake by not adequately planning for the fall of Moammar Gadhafi in 2011, Libya remains in chaos. In the past seven years, four nations have conducted air strikes in Libya and hundreds of civilians have died in those strikes.

As the protests of the Arab Spring swept through Libya, Gadhafi mounted a war of attrition against his own people describing those who were protesting his rule as "rats."

The Obama administration helped steer a UN resolution to take military action to protect Libyan civilians, which resulted in a US-led NATO intervention in Libya. Gadhafi was eventually killed by rebels.

However, the lack of planning for the "day after" the regime's collapse helped set the stage for a civil war. Today that civil war grinds on. Taking advantage of the chaos in Libya, ISIS and al Qaeda have also taken root in the country.

A feature of the continuing conflict in Libya is the use of airstrikes by a number of foreign countries and local groups, spurred by the rise in militant organizations in the country as well as the ongoing civil war.

Since the NATO intervention officially ended on Oct. 31, 2011, there have been 2,158 reported airstrikes in Libya documented by the research organizations Airwars and New America in a new study released Wednesday . (This piece is partially adapted from that report.)

Four countries -- Egypt, France, the United Arab Emirates (UAE), and the United States -- as well as three local Libyan groups, including the Libyan government, known as the GNA, and a rival group led by Field Marshal Khalifa Haftar, carried out those air strikes.

Since 2014, Libya has increasingly become an arena for warfare by multiple states. The GNA is supported by the United States, which also carries out strikes against ISIS and al-Qaeda.

Egypt and the UAE are carrying out their own strikes either in support of Field Marshal Haftar or against Islamist militias.

France is also striking Islamist militant targets in Libya.

According to news reports and accounts on social media, at least 242 civilians were killed in these strikes, taking the lowest estimate, and as many as 395 killed, by the highest estimate, according to the Airwars/New America study.

No nation or local group has admitted responsibility for any of these civilian deaths.

The Airwars/New America study is the first overall accounting of these civilian deaths.

Officials from Egypt, France, and the United Arab Emirates and the three local Libyan groups didn't respond when asked for comment about their air strikes.

According to the Airwars/New America study, the US has conducted at least 524 strikes on militant targets in Libya since the NATO intervention, primarily against ISIS in the city of Sirte during 2016, which according to Libyan reports, resulted in between 10 to 20 civilian fatalities.

Asked for comment on the allegations of civilian deaths, US Major Karl Wiest said that AFRICOM, which is in charge of US military operations in Libya, conducted "post-strike assessments" of all American military actions in the region and has investigated two allegations of civilian casualties in Libya, and found both to be not credible.

Of the four countries conducting air strikes in Libya, the United States is the most transparent about its operations, reporting publicly, for instance, on the 495 air and drone strikes it conducted against ISIS in Sirte.

The airstrikes by the four nations and the competing Libyan factions are intensifying the conflict in an already fragile country.

Egypt has defended its airstrikes in Libya using a self-defense argument that these strikes are aimed at terrorist groups that threaten their security; this is the same kind of argument the United States has made since 9/11 to defend its covert drone program aimed at suspected terrorists in the tribal areas of Pakistan along its border with Afghanistan and its counterterrorism operations in Somalia and Yemen.

Follow CNN Opinion Join us on Twitter and Facebook

The fact that four foreign countries are conducting airstrikes in Libya underscores the chaos and instability in the country, while battles between the two main competing Libyan factions have contributed to the conflict that prompted Obama to describe the post-Gadhafi conflict in Libya as his worst mistake.

Solving the conflict will not be easy. The US-led campaign against ISIS in Libya greatly reduced, but did not end the presence of the terrorist army there, so keeping up the pressure on both ISIS and al Qaeda in Libya is important for US national security interests.