NATO Secretary General Anders Fogh Rasmussen says the alliance will end its seven-month mission in Libya on Oct. 31.

"We have taken a preliminary decision to end Operation Unified Protector on Oct. 31," Fogh Rasmussen said Friday. "We will take a formal decision early next week."

NATO air patrols are set to continue over the next 10 days as a precautionary measure. They will be reduced over that period, if no violence breaks out.

Earlier Friday, NATO's top commander said he intended to recommend that the military alliance pull the plug on its bombing campaign against Moammar Gadhafi and his fallen regime.

Adm. Jim Stavridis posted a Facebook message on Friday outlining his plans to tell NATO's governing body that it was time for the Libyan mission to end.

"A good day for NATO, a great day for the people of Libya," Stavridis said, just a day after Gadhafi was killed.

NATO confirmed the authenticity of the message Stavridis posted online.

While Stavridis' recommendation is a signal that NATO believes the threat against civilians has ceased, the military alliance will also consider the wishes of Libya's transitional government and the United Nations when forming a decision about the mission at a Friday meeting.

British Defence Secretary Philip Hammond told BBC radio that NATO must ensure that there are no possible reprisals by Gadhafi loyalists before it pulls out of the mission.

"NATO will now meet to decide when the mission is complete, and once we are satisfied that there is no threat to the Libyan civilians and the Libyans are content, NATO will then arrange to wind up the mission," he said.

Since the so-called Unified Protector mission launched in late March, NATO warplanes flew more than 26,000 sorties over Libya and made more than 9,600 strikes against Gadhafi military targets.

The thousands of NATO airstrikes helped eradicate Libya's air force and air defences, removing a major military advantage Gadhafi held over the revolutionary fighters who sought to overthrow his rule.

In the ensuing months, the Libyan fighters slowly increased their control over the country, eventually reaching their goal of toppling Gadhafi.

Even on Thursday, it appears NATO airstrikes helped turn steer the last battle against Gadhafi fully in favour of the revolutionary fighters.

NATO warplanes struck a convoy of 75 vehicles that was moving in Sirte, the hometown of the soon-to-be-dead dictator.

After the hit on the convoy, a smaller group of vehicles tried to get away. Unbeknownst to NATO, Gadhafi was part of the group.

"We later learned from open sources and intelligence that Gadhafi was in the convoy and that the strike likely contributed to his capture," NATO said in a statement released Friday.

Rasmussen said the successful work that NATO did in Libya was proof that the military alliance can play a key role in addressing security threats now and in the future.

With files from The Associated Press