so he was hastily made a duke and packed off to genua , whereupon his first action was to consider what was that city 's greatest military threat and then , having identified it , to declare war on ankh- morpork .