The Tripolitanian civil war was a conflict from 1790 to 1795 which occurred in Ottoman Tripolitania – inside what is today the country of Libya. It involved a war of succession between leading members of the Karamanli dynasty, an intervention by Ottoman officer Ali Burghul who claimed to be acting on the sultan's orders and controlled Tripoli for 17 months, and an intervention by the bey of Tunis Hammuda ibn Ali to restore the Karamanlis to power.