The enemy of my enemy is my friend
The phrase the enemy of my enemy is my friend (sometimes shortened to enemy mine) is a proverb that advances the concept that because two parties have a common enemy, they can work with each other to advance their common goals. Often described as an Arabic proverb, an early Indian variation saying "Any king, whose kingdom shares a common border with that of the conqueror is an antagonist" is known to exist, dating back to the 4th century B.C.
In foreign policy, it's a doctrine commonly used to interact with a significant enemy through an intermediary rather than through direct confrontation.
Examples throughout history are common, such as the Western capitalist democracies aiding the Soviet Union following the Nazi invasion during World War II, or U.S. support for anti-Communist dictatorships during the Cold War.
The king who is situated anywhere immediately on the circumference of the conqueror's territory is termed the enemy.
The king who is likewise situated close to the enemy, but separated from the conqueror only by the enemy, is termed the friend (of the conqueror).—Kautilya, Arthasastra
During the Second World War, said foreign policy was often on display within the Allied powers. On the European side of the war, tension was common between the Western Allies and the Soviet Union. The fiercely anti-Communist British Prime Minister Winston Churchill declared that, "if Hitler invaded Hell, I would make at least a favourable reference to the Devil in the House of Commons," in support of British aid to Soviet forces. Like Churchill, U.S. President Franklin D. Roosevelt was wary of Joseph Stalin and his dictatorial regime, but realized the Soviets were necessary for the Allied war effort. The Soviet leader reciprocated these feelings towards his Western allies, as he also viewed the alliance as necessity in order to defeat the Nazi invasion. He was also distrustful of the Western Allies and feared that they would negotiate a separate cease-fire with Nazi Germany. In addition to the European World War II Allies, the doctrine of "the enemy of my enemy is my friend" was also seen during the Chinese campaign of the war as Communist and Nationalist troops, which had been fighting each other in the Chinese Civil War, joined forces to fight Japanese aggression.
The doctrine was also used extensively during the Cold War between the West and the Soviet Union. The Soviets and the Chinese aided North Korea during the Korean War, and the Viet Cong/North Vietnamese during the Vietnam War to oppose American foreign policy goals. Likewise, the United States and its allies supported the Afghan Mujahideen after the Soviet invasion in the hopes of thwarting their goals there. In the Third World, both superpowers were willing to support regimes whose values were at odds with the ideals espoused by their governments—capitalism and democracy in the case of the United States, and the Marxist–Leninist interpretation of Communism in the case of the Soviet Union. The United States government was willing to support undemocratic regimes in order to oppose the spread of Communism, such as Mobutu Sese Seko in Zaire and Augusto Pinochet in Chile. Although not directly related to the global Western/Soviet power struggle, the United States also backed Saddam Hussein during the Iran–Iraq War due to the anti-American Iranian Revolution of 1979. Similarly, the Soviet Union supported a handful of nations with overtly anti-Communist governments in order to oppose American foreign policy, most notably Gamal Abdul Nasser in Egypt. The Soviets also backed India to counter both the pro-American Pakistani government and the People's Republic of China (following the Sino-Soviet split)—despite India having a democratic government (see India – Russia relations and references therein). Similarly, China, following the split, lent support to nations and factions who embraced an anti-Soviet, often Maoist form of Communism, but whose governments nonetheless embraced Sinophobic policies at home, such as the Khmer Rouge.
"The enemy of my enemy is my friend" is also thought to be the reasoning behind Albania's alignment with the Soviet Union after the Socialist Federal Republic of Yugoslavia was expelled by the Soviet Union from Cominform in 1948. Then, again, in 1961, with Albania re-aligned with China, after relations between Belgrade and Moscow had become friendly once more during the Krushchev regime. The Auld Alliance, between France and Scotland, was used to attack England.
Using a common enemy as the basis for an allegiance is problematic unless there are other substantial areas for common ground; otherwise, absent the common enemy, the friends might well be enemies themselves. If the common enemy disappears, the allies might turn on each other. This has been shown before, such as at the end of World War II; without a common enemy, the differences between the United States, the United Kingdom, and France and their Soviet allies were no longer accepted because the threat they shared was absent. Cartoonist Howard Tayler, using humor toward social critique, condenses the concept into "Maxim 29", "The enemy of my enemy is my enemy's enemy. No more. No less." 
- The Enemy of My Enemy
- You're either with us, or against us
- Law of excluded middle
- Lesser of two evils principle
- Kautilya "Arthasastra" translated by R. Shamasastry, Third Edition, Weslyan Mission Press 1929 Mysore, p. 296.
- Sir Winston Churchill: Biographical History Churchill College, Cambridge
- Stefan, Charles G.Roosevelt and the Wartime Summit Conferences with Stalin. University of North Carolina.
- Kenez, Peter (2006). A History of the Soviet Union from the Beginning to the End (2nd Ed.). Cambridge University Press.
- Chinese Civil War. GlobalSecurity.org.
- Poroskov, Nikolai (April 30, 2005). The USSR was actively involved in the war in Vietnam 30 years ago. Pravda.
- No Regrets: Carter, Brzezinski and the Muj.
- French, Howard W (September 8, 1997). Mobutu Sese Seko, Longtime Dictator of Zaire. The New York Times.
- Kornbluh, Peter (October 24, 1999).Still Hidden: A Full Record Of What the U.S. Did in Chile. The Washington Post.
- Dobbs, Michael (December 30, 2002). U.S. Had Key Role in Iraq Buildup. The Washington Post.
- Anti-Communist Rally. June 23, 1961. TIME Magazine.