During World War II he remained neutral, but trouble began afterward, when the British strengthened their position in Aden and Yemenis who were discontented with Yahya's isolationist autocracy looked to them for support. Yemenis abroad also supported the domestic dissidents, but opposition did not become active until 1946. Two years later, the aged imam was machine-gunned to death.
By the end of World War II, dissatisfaction had spread to a rather wide segment of Yemeni society, including secular reformers, Muslim reformers, other elements of the traditional elite, and even the 'ulama' (religious scholars). This tide of dissent culminated early in 1948 in the assassination of Imam Yahya and a coup d'état by the reformers. Much to the consternation of the various reform elements, however, Imam Yahya's son, Ahmad, succeeded in bringing together many of the tribal elements of the north, overthrowing the new government, and installing himself as imam.