Remember back to the original “Libyan Liberation.” Qaddafi was pressing the dissidents hard, back to Behghazi, which as he said, was Al Quada HQ, the city that sent the most jihadists to Iraq and A-stan to fight the Amriki crusaders.
IOW, Qaddafi, then our ally or at least our bitch, (paid reps for Lockerbie, etc), was trying to destroy the big Al Queda nest in that area, then reconsolidate power. We intervened to save Behghazi and eventually topple Qaddafi, but the end result is we saved the biggest nest of Al Qaeda in the Maghreb.
And this is the thanks we get. It's the Aesop's fable about the farmer and the frozen viper, said snake warms up against his chest and immediately bites his rescuer, saying, “It's my nature.”
Not all those black flags are those of Al-Quaeda supporters. Not by a long shot.