The enemy of my enemy is my friend is an ancient proverb which suggests that two parties can or should work together against a common enemy. The earliest known expression of this concept is found in a Sanskrit treatise on statecraft, the Arthashastra, which dates to around the 4th century BC, while the first recorded use of the current English version came in 1884.
International policy
In his Arthashastra:, "The Source of Sovereign States", Kautilya writes:
The idea that "the enemy of my enemy is my friend" functioned in various guises as foreign policy by the Allies during World War II. In Europe, tension was common between the Western Allies and the Soviet Union. Despite their inherent differences, they recognized a need to work together to meet the threat of Nazi aggression under the leadership of Adolf Hitler. Both U.S. President Franklin D. Roosevelt and British Prime Minister Winston Churchill were wary of the Soviet Union under the leadership of Joseph Stalin. However, both developed policies with an understanding that Soviet cooperation was necessary for the Allied war effort to succeed. There is a made to his personal secretary John Colvilleon the eve of Germany's invasion of the Soviet Union. He was quoted as saying, "if Hitler invaded Hell, I would make at least a favorable reference to the Devil in the House of Commons." The Soviet leader reciprocated these feelings towards his Western allies. He was distrustful and feared that they would negotiate a separate peace with Nazi Germany. However, he also viewed their assistance as critical in resisting the Nazi invasion. The doctrine of "the enemy of my enemy is my friend" was employed by nation states in regions outside of the European theater as well. In the Second Sino-Japanese War, within the Pacific theater, an alliance was formed between Chinese Communists and Chinese Nationalists. Leading up to this, these forces had battled each other throughout the Chinese Civil War. However, they formed an alliance, the Second United Front in response to the mutual threat of Japanese aggression. Similarly, the Malayan Communist Party and the British Empire agreed a truce for the Malayan Campaign and subsequent Japanese Occupation.
The doctrine was also used extensively during the Cold War between Western Bloc nations and the Soviet Union. The Soviets and the Chinese aided North Korea during the Korean War as well as 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 the spread of Communism. In the Third World, both superpowers supported regimes whose values were at odds with the ideals espoused by their governments. These ideals were capitalism and liberal democracy in the case of the United States, and the Marxist–Leninist interpretation of Communism and proletarian democracy in the case of the Soviet Union. In order to oppose the spread of Communism, the United States government supported dictatorial regimes, such as Mobutu Sese Seko in Zaire, Suharto in Indonesia, and Augusto Pinochet in Chile. The support provided by the Soviet Union towards nations with overtly anti-Communist governments, such as Gamal Abdul Nasser in Egypt, in order to oppose American influence, is another example of "the enemy of my enemy is my friend" as policy on an international scale. The Soviets also backed India to counter both the pro-American Pakistani government and the People's Republic of China, despite the fact that India had a democratic government. Similarly, China, following the split, lent support to nations and factions that embraced an anti-Soviet, often Maoist form of Communism, but whose governments nonetheless embraced Sinophobic policies at home, such as the Khmer Rouge-ruled regime of Democratic Kampuchea.
Middle East
In an example of this doctrine at work in Middle Eastern foreign policy, United States backed the Iraqi government under Saddam Hussein during the Iran–Iraq War, as a strategic response to the anti-American Iranian Revolution of 1979. A 2001 study of international relations in the Middle East used the proverb as the basis of its main thesis, examining how enmity between adverse nations evolve and alliances develop in response to common threats.
Balance theory
In mathematical sociology a signed graph may be used to represent a social network that may or may not be balanced, depending upon the signs found along cycles. Fritz Heider considered a pair of friends with a common enemy as a balanced triangle. The full spectrum of changes induced by unbalanced networks was described by Anatol Rapoport: Frank Harary described how balance theory can predict coalition formation in international relations: Harary illustrated the method as a gloss on some events in the Middle East using several signed graphs, one of which represented eight nations.