I think there's a word or an adjective for it, but I don't remember what it was. I don't want to say plan B, because that's too informal, but I remember there was a good word for it. I just don't remember it anymore.
For example:
The army was flanked by the enemies unexpectedly so that the general had to rely on his ___ plan.