Prior to that, he also simultaneously served in the Ayub Khan's administration as an Interior Minister and Defence Minister until resigning when General Yahya Khan, an Army Commander-in-Chief, enforced a martial law in 1969. Gaining commission in Royal Indian Navy in 1938, he served in first war with India in 1947 in non-combat operations but earned notability and prestige when he commanded the Pakistan Navy against Indian Navy during the war with India in 1965.