Tripoli
Tripoli was a trading city on the North African coast. In 1337 Muhammad ibn Thabit of the Berber Banu Thabit ruled it as an effectively independent emir under the nominal authority of Tunis.
Genoese raiders sacked Tripoli in 1354 and sold it to the Banu Makki, but the exiled Banu Thabit hired Christian ships and recovered it in 1369. The Hafsids ended their rule in 1401. Spain conquered the city in 1510, and the Ottoman Turgut Reis took it in 1551; the Karamanli dynasty ruled from 1711 until direct Ottoman government returned in 1835.