NATO’s chief has admitted that efforts to stabilize Libya after its bombing campaign helped to oust the Gaddafi regime in 2011 failed. But responsibility lies with the international community and new Libyan authorities, Jens Stoltenberg believes.

Speaking to the media after a meeting of the NATO foreign ministers in Turkey, Jens Stoltenberg said: "The challenge was that after the military operation has ended, the efforts to try to stabilize the country did not succeed."

In 2011, NATO countries started a military operation against the regime of Libya's leader Colonel Muammar Gaddafi. The stated goal of the campaign was to protect the country's civilians, following a wave of protests against Gaddafi's 40-year-long rule.

As a result of the seven months of airstrikes and other support for the uprising against Gaddafi, he was ousted from power and subsequently killed by rebels. His government was replaced by a collection of tribal leaders, which quickly descended into infighting.

However the blame for failing to stabilize the country lies with the whole international community and on the post-Gaddafi Libyan authorities, Stoltenberg said.

"That's the responsibility of the whole international community, but also, of course, of the government and Libya itself to make sure that they are able to stabilize their own country."

READ MORE: Libya against EU migrant plan, ‘won’t accept any boots on the ground’ – country’s UN envoy

At the moment, Libya is still in turmoil, with two separate governments both claiming to be legitimate. The unrest also triggered a spike in the numbers of illegal migrants seeking refuge in Europe, leading to a Mediterranean migrant crisis.

Speaking in Turkey, however, Stoltenberg stressed that NATO had done in Libya what the United Nations gave it the green light to do: "When it comes to the NATO operation I think we all have to remember that that was an operation with a very clear UN mandate. And our task was to protect civilians against the violence conducted by the Gaddafi regime and we did so. We did what we were asked to do in accordance with the UN mandate."

"NATO stands ready to do capacity building in Libya when the security situation allows," the Secretary General added.