The military’s role in a contested election