Question: what is the  capital city of libya which  Barbary pirates was also based primarily in 
Sentence (from "Tripoli"): The city is located in the northwestern part of Libya on the edge of the desert, on a point of rocky land projecting into the Mediterranean and forming a bay.
Relevant evidence: No