Libyan people with the Kingdom of Libya flags gather during celebrations for the liberation of Libya in Quiche, Benghazi October 23, 2011. REUTERS

NATO confirmed on Friday it would end its Libyan mission next week, seven months after launching air and sea operations that helped bring the overthrow and death of Muammar Gaddafi.

Ambassadors from the 28 NATO states meeting in Brussels formalised a preliminary decision reached a week ago to end the mission that NATO took over on March 31 on October 31.

Our military job is now done, NATO Secretary-General Anders Fogh Rasmussen said in a message on Twitter confirming the decision.

On Thursday, the 15-nation U.N. Security Council unanimously approved a resolution terminating from next Monday a U.N. mandate that set a no-fly zone over Libya and permitted foreign military forces, including NATO, to use all necessary measures to protect Libyan civilians.

The decisions to end the mandate and the NATO mission were made despite a request from Libya's interim government for the Security Council to wait for the National Transitional Council (NTC) to decide if it wants NATO help to secure its borders.

Rasmussen said on Thursday he did not expect NATO to play a major role in post-war Libya, although it could help the transition to democracy through assistance with security sector reform.

I wouldn't expect new tasks beyond that, he said.

The NTC officially announced Libya's liberation on October 23, days after the capture and death of Gaddafi. NATO commanders have said they believe the interim administration is able to take care of the country's security.

Libyan Deputy U.N. Ambassador Ibrahim Dabbashi asked the U.N. Security Council on Wednesday to wait before terminating the mandate. He said the government needed time to assess the security situation in its country and its ability to monitor its borders.

Western diplomats said council members did not want to wait and NATO allies have been keen to see a quick conclusion to a costly effort that has involved more than 26,000 air sorties and round-the-clock naval patrols, at a time when budgets are under severe strain due to the global economic crisis.

While NATO has declared the mission a success, the intervention caused sharp rifts in the alliance and went on much longer than Western nations had expected or wanted.

NATO officials said members of the alliance were free to give further security aid to Libya individually.

Officials pointed to comments from Qatar's top general, who said on Wednesday that Western countries had proposed setting up a new alliance headed by Qatar to support Libya after NATO ends its mission.

The U.N. resolution does not lift the arms embargo or other U.N. sanctions on Libya that have been in place for half a year. It made clear that weapons were still a problem, voicing concern at the proliferation of arms in Libya and its potential impact on regional peace and security.