Updated

NATO's top official on Monday marked the end of the alliance's seven-month air campaign over Libya, which played a key role in ousting Muammar Qaddafi, with what he billed as a historic visit to the country.

Secretary-General Anders Fogh Rasmussen arrived in Tripoli for talks with Libya's interim leaders before NATO operations end at midnight Monday Libyan time. Last week, the U.N. Security Council -- which authorized the mission in March -- ordered an end to all military action in Libya.

The country's 8-month civil war ended earlier this month, with the capture and death of Qaddafi.

Libyan officials had appealed for an extension of the air campaign until the end of the year, said Information Minister Mahmoud Shammam. He said Libya's interim government wanted NATO's help in preventing Qaddafi loyalists from fleeing, but that Libya would be able to manage even without the military alliance's protective umbrella.

Allied air forces carried out 9,600 strike sorties in the past seven months, destroying about 5,900 military targets.

More On This...

    The mission has been hailed as a success by NATO's military and political leaders, who have argued that the bombing raids caused minimal loss of innocent lives while paralyzing Qaddafi's command and control networks and preventing his forces from carrying out reprisals against civilians.

    NATO persevered during a months-long period of stalemate on the battlefields, when it appeared that Libya could become an Afghanistan-like quagmire.

    In a comment posted on Twitter Monday, Fogh Rasmussen said he was the first NATO chief to visit Libya and called his trip "historic."

    NATO's supreme military commander, Adm. James Stavridis, said Monday was "a proud and historic day for NATO having successfully concluded operations to protect the people of Libya."

    "In accordance with direction from the North Atlantic Council, I have signed the orders concluding NATO's mission in Libya as of Monday," he told The Associated Press.

    Spokesman Col. Roland Lavoie said NATO staff temporarily seconded to the headquarters in Naples, Italy, for the operation are being reassigned to regular duties. The alliance concluded its airstrikes soon after Qaddafi's capture and death on Oct. 20, but maintained regular air patrols over Libya.

    But the campaign caused deep strains within the alliance, with only eight of the 28 member states agreeing to participate in the operation. Although allied aircraft enjoyed total air supremacy after Qaddafi's weak air defenses were destroyed early on, it took more than seven months of near daily airstrikes to finally defeat his demoralized forces.

    The operation's critics -- including Russia, China, the African Union, and others -- have argued that NATO misused the limited U.N. resolution imposing a no-fly zone and authorizing the protection of civilians as a pretext to promote regime change.

    NATO says that despite calls for it to intervene in Syria, it has no intention of launching a similar operation there.

    "We took on responsibility in Libya because there was a clear UN mandate and because we received clear support from countries in the region," Fogh Rasmussen said after a meeting of defense ministers this month. "None of these conditions are fulfilled in regards to Syria, and these conditions are essential."