In writing your antagonists, never make them allies until you need them to be allies.
And never make them enemies until you need them to be enemies.
That is probably one of the most useful pieces of advice I have ever been given. It doesn't affect the motivations or motives of the antagonists when encountered, but like everything human it leaves plenty of scope for flexibility and openness in one's dealings with antagonists in fiction, or with non-player characters in tabletop fantasy roleplaying adventures.