 For part of the medieval era the Zaydiyyah imams were eclipsed by the lowland dynasties, and for long periods there would be no imam at all (especially in 1066–1138 and 1171–1187).From the end of the thirteenth century the political fortunes of the Zaydiyya imams revived somewhat.They were able to hold their own against the Rasulids and Tahirids and sometimes expand their territory.