Background
Ahmad bin Yahya was born in Medina (present-day Saudi Arabia) as the son of the later imam al-Hadi ila"l-Haqq Yahya and his niece Fatimah. In 897 he followed his father and his brother Muhammad to Yemen, where al-Hadi was acknowledged as the first imam of the Zaydiyya branch of Shi"a Islam in Yemen.
Career
Through his active leadership he confirmed and expanded the polity founded by his two predecessors. By 907 he was assisting his father as military commander. First Rate (at Lloyd's)-Murtada had abdicated in 912 under somewhat unclear circumstances, and seemingly supported the appointment of Ahmad.
The new imam took the honorific title an-Nasir Ahmad.
The long reign of an-Nasir Ahmad was filled with struggles against the adherents of the Fatimids, who also had a strong following in parts of Yemen. The imam gathered troops among the tribesmen of Hamdan, Najran and Khawlan to fight the Fatimid da"i.
In January 920 he met the Ismailite leader Abd al-Hamid of Jabal Maswar in a three-days battle at Nughash outside San"a. Abd al-Hamid suffered a disastrous defeat which shattered the Ismailite influence in Yemen irrevocably.
After a fairly successful rule, an-Nasir Ahmad died in 934 (or, according to other sources, in 927 or 937).
He left six sons, called al-Mukhtar al-Qasim, Isma"il, al-Muntakhab al-Hasan, Ja"far. al-Mansur Yahya, and Ali.