Question: what is the  capital city of libya which  Barbary pirates was also based primarily in 
Sentence (from "Tripoli"): Tripoli (Arabic: طرابلس‎ ‎ , "Ṭarābulus" ; Berber: "Ṭrables") is the capital city and the largest city of Libya.
Relevant evidence: Yes