NATO said Friday it plans to end its seven-month bombing campaign in Libya at the end of the month, leaving the battle-scarred country's new authorities on their own to ensure security after the death of Moammar Gadhafi and the ouster of his regime.

The alliance made a preliminary decision to end the campaign on Oct. 31 and will make the formal decision next week, Secretary General Anders Fogh Rasmussen said after a meeting of the alliance's governing body, the North Atlantic Council.

Diplomats said NATO air patrols are set to continue over Libya in the next 10 days as a precautionary measure to ensure the stability of the new regime. They will gradually be reduced in coming days if there are no further outbreaks of violence.

The council took into account the wishes of Libya's new government and of the United Nations, under whose mandate NATO carried out its operations.

Victory in the war represents a major boost for the Cold War alliance, which is bogged down in the 10-year war in Afghanistan, the 12-year mission in Kosovo, and the seemingly never-ending anti-piracy operation off the Somali coastline.

It polished the reputation of France and Britain, the two countries that drove it forward, coming at a time when the alliance's relevance is increasingly in doubt as countries make deep defense cuts and other austerity measures caused by the international economic crisis.

Rasmussen hailed the success of the operation which started on March 19 with a series of U.S.-led attacks designed to suppress Gadhafi's formidable air defenses, including missile and radar networks. Libya's former rebels killed Gadhafi on Thursday, and officials had said they expected the aerial operation to end very soon.

"It shows that freedom is the biggest force in the world," Fogh Rasmussen said.

Fogh Rasmussen said NATO had no intention of leaving any residual force in or near Libya.

"We expect to close down the operation."

He said it was up to the new government to decide whether to launch an investigation into the hazy circumstances of Gadhafi's death.

"With regards to Gadhafi, I would expect the new authorities in Libya to live up fully to the basic principles of rule of law and human rights, including full transparency."

NATO earlier said its commanders were not aware that Gadhafi was in a convoy that NATO bombed as it fled Sirte. In a statement Friday, the alliance said an initial Thursday morning strike was aimed at a convoy of approximately 75 armed vehicles leaving Sirte, the Libyan city defended by Gadhafi loyalists. One vehicle was destroyed, which resulted in the convoy's dispersal.

Another jet then engaged approximately 20 vehicles that were driving at great speed toward the south, destroying or damaging about 10 of them.

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

Intelligence gleaned during surveillance flights around Sirte on Thursday indicated that a "command and control group, including senior military leaders" were attempting to flee from the town, British Prime Minister David Cameron's spokesman Steve Field said.

"There was a strike, there was damage to the convoy, the Free Libya Fighters then moved in _ as to what happened next that is not entirely clear," he said.

NATO warplanes have flown about 26,000 sorties, including over 9,600 strike missions. They destroyed about 5,900 military targets, including Libya's air defenses and over 1,000 tanks, vehicles and guns, as well as Gadhafi's command and control networks.

The daily airstrikes finally broke the stalemate that developed after Gadhafi's initial attempts failed to crush the rebellion that broke out in February. In August, the rebels began advancing on Tripoli, with the NATO warplanes providing close air support and destroying any attempts by the defenders to block them.

NATO was sharply criticized by Russia, China, South Africa and other nations for overstepping the limited U.N. Security Council resolution that allowed it to protect civilians, and using it as a pretext to pursue regime change in Libya.

French President Nicolas Sarkozy said earlier Friday that "the operation has reached its end."

But in London, Britain had suggested that NATO may not immediately complete its mission in Libya, wary over the potential reprisal attacks by remaining Gadhafi loyalists.

___

Associated Press writers Elaine Ganley in Paris and David Stringer in London contributed to this report.

___

Follow Slobodan Lekic on Twitter at http://twitter.com/slekich