The enemy of my enemy is my friend.

Isn’t that how that one goes?