An already politically weakened prime minister has been weakened further by the resignation of the defence secretary.