President Barack Obama has strongly criticized the leaders of Great Britain and France for their policy toward Libya after the 2011 overthrow of dictator Muammar Qaddafi, saying that he was mistaken to believe the U.S.' European allies would be "more invested in the follow-up" to Qaddafi's fall. 

Obama made the remarks in an interview with The Atlantic magazine. The criticisms of British Prime Minister David Cameron, in particular, are some of the strongest of a sitting U.K. leader by a sitting president. 

In the interview, Obama calls the situation in Libya a "mess" in part because he says Cameron became "distracted by a range of other things."

"When I go back and I ask myself what went wrong, there's room for criticism, because I had more faith in the Europeans," Obama says.

The president also criticized then-French President Nicolas Sarkozy for being too eager to take credit for the intervention that overthrow Qaddafi, who was killed by rebel forces in October 2011. 

"Sarkozy wanted to trumpet the flights he was taking in the air campaign," Obama said, "despite the fact that [the U.S.] had wiped out all the air defences and essentially set up the entire infrastructure."

Obama also said that he had warned Cameron that the so-called "special relationship" between Britain and the U.S. would end if the London government did not commit to spending 2 percent of its GDP on defense.

"Free riders aggravate me," Obama says at one point in the interview.

A spokeswoman for Cameron told Sky News that the prime minister still believes intervention in Libya was "absolutely the right thing to do."

Since 2014, an internationally recognized government has convened in the far east of Libya while a rival Islamist government is based in Tripoli. The United Nations has been trying to help forge a unity government to revive services to millions of people and confront ISIS extremists.

Meanwhile, a U.N. report published Thursday said that ISIS had "significantly expanded" the amount of territory in controls in Libya.

"While ISIL does not currently generate direct revenue from the exploitation of oil in Libya, its attacks against oil installations seriously compromise the country's economic stability," the six-member panel said, using another name for the terror group. "Libyans have increasingly fallen victim to the terrorist group's brutalities, culminating in several mass killings."

According to the experts, Libya has become increasingly attractive to foreign fighters and their presence in the south "is symptomatic of the regional dimension of the conflict." It added that countries in the region have been providing political support -- and possibly more -- to various groups, further fueling the continuation of fighting.

The experts said in the report to the U.N. Security Council that all parties in the conflict are continuing to receive illicit arms transfers, some with support from U.N. member countries.

The Associated Press contributed to this report.