Snatching defeat from the jaws of victory