All the three lines (and definitely the third one) appear to have been descended from the Hamdan tribe, just like the Ismaili Sulayhid dynasty who ruled Yemen and were adherents of the Egyptian Fatimid caliphs.
Ma'an was deposed and imprisoned in 1116 by the Qadi Ahmad, son of governor Imran, since he was too weak to uphold authority over the Hamdan sub-tribes.
The son of qadi Ahmad bin Imran, Hamid ad-Dawla Hatim, entered the city with 700 Hamdani horsemen and was established as sultan.
But Sultan Ali pursued him there with his troops and the Dai’s reluctance to cause further strife among the Hamdan qabila prompted him to relinquish his hopes for acquiring territories in the San’aa region.
After the end of Sulayhid rule in Yemen, the country was split between a number of competing petty dynasties along tribal and religious lines.
Military victories alternated with defeats, but in 1173 he allied with the Zurayids of Aden and worsted the religiously deviant Mahdid regime.
The Ayyubid ruler in Egypt, Saladin sent his brother Turan Shah with an army to South Arabia in the same year.