Keep you friends close. You enemies even closer.... Sun Tzu(?)....
I first heard it in the Godfather movies from Don Corleone.
A more Sun Tzu’ish quote (IMHO) would be “Keep your friends happy, and try to convince your enemies to be your friend, and if you cannot- defeat them in a way with minimum danger to yourself and minimum resources wasted”.