The imam was able to regain them temporarily in 1818, but new intervention by the Ottoman viceroy of Egypt in 1833 again wrested the coast from the ruler in Sana'a. After 1835 the imamate changed hands with great frequency and some imams were assassinated. After 1849 the Zaidi polity descended into chaos that lasted for decades.[22]