The Rustamid dynasty (or Rustumids, Rostemids) was an Ibadi dynasty of Persian origin which ruled a state that was centered in present-day Algeria. The dynasty governed as a Muslim theocracy for a century and a half from its capital Tahert (present day Tagdemt) until the Ismaili Fatimid Caliphate defeated it. Rustamid authority extended over what is now central and western Algeria, parts of southern Tunisia, and the Jebel Nafusa and Fezzan regions in Libya as far as Zawila.