Britain's most senior generals have issued a blunt warning to Downing Street that the military campaign in Afghanistan is facing a catastrophic failure, a development that could lead to an Islamist government seizing power in neighbouring Pakistan.