One moment he was the global peacemaker who had “ended eight wars”, the next he was threatening to wipe out Iran.