The Karamanli regime, however, declines under Ahmad's…
1684 CE to 1827 CE
The Karamanli regime, however, declines under Ahmad's successors.
Then in 1793, a Turkish officer, Ali Benghul, overthrows the Karamanlis and restores Tripoli to Ottoman rule.
With the aid of the bey of Tunis, Yusuf ibn Ali Karamanli (reigned 1795-1832) returns to Tripoli and installs himself as pasha.
A throwback to the founder of the dynasty, he tames the tribes and defies both the Porte and British naval power to assist Napoleon Bonaparte during his Egyptian campaign in 1799.