on the offensive. In March 2011 it recaptured several cities and was
advancing on Benghazi. The rebels appealed for foreign intervention. The UN
Security Council passed a resolution authorising “all necessary measures” to
protect civilians. NATO took this as carte blanche to intervene on the side of
the rebels, bombing government troops and sending military advisers to
accompany selected rebel units. The rebels also got aid and military advisers
from Qatar.

Eventually
the rebels gained the upper hand. NATO bombing played an important role in the
rebel victory. NATO planes carried out more than 9600 bombing raids on Libya.[10]

NATO
special forces personnel accompanying some rebel units were able to guide NATO
aircraft in accurately targeting pro-Gaddafi troops who were blocking their
advance. According to George Friedman of STRATFOR:

Accurately
identifying targets and taking them out with sufficient precision involves
highly skilled special operationsteams guiding munitions to those targets. The
fact that there have been relatively few friendly-fire accidents indicates that
standard operational procedures have been in place.

These teams were
probably joined by other special operators who trained – and in most cases
informally led – indigenous forces in battle. There were ample reports in the
early days of the war that special operations teams were on the ground
conducting weapons training and organising the fighters who opposed Gaddafi.[11]

During
August rebel forces advanced on Tripoli from the west. There was also an
insurrection within Tripoli by residents of the city. Participants in this
insurrection claimed to have liberated most of Tripoli before the rebels from
outside the city arrived.

Tripoli
residents showed considerable suspicion towards the outsiders. According to
Nicholas Pelham, writing in the online version of Middle East Report on September
7, 2011:

Neighborhoods that
claim