Dual Alliance (1879)
The Dual Alliance was a defensive alliance between Germany and Austria-Hungary, which was created by treaty on October 7th, 1879 as part of Germany's Otto von Bismarck's system of alliances to prevent or limit war. The two powers promised each other support in case of attack by Russia. Also, each state promised benevolent neutrality to the other if one of them was attacked by another European power (generally taken to be France, even more so after the Franco-Russian Alliance of 1894). Bismarck saw the alliance as a way to prevent the isolation of the German Empire, which had just been founded a few years before, and to preserve peace, as Russia would not wage war against both empires.  
When Austria-Hungary and Germany formed an alliance in 1879, it was one of the more surprising alliances of its time. Though both realms shared the German language and a similar culture, Austria-Hungary and Germany were often driven apart, most notably in the recent Austro-Prussian War. Additionally, the Habsburg rulers of Austria believed that the promotion of nationalism, which was favored by Germany, would destroy their multinational empire. However, their common dislike for Russia brought the two nations together for a common cause.
Alliance against Russia
After the formation of the German Empire in 1871, German chancellor Otto von Bismarck wanted to portray his nation as a peacemaker and preserver of the European status quo, as well as gain more power for the German Empire and unify Germany. In 1878, Russia defeated the Ottoman Empire in the Russo-Turkish War; the resulting Treaty of San Stefano gave Russia considerable influence in the Balkans. This development outraged Austria-Hungary, Russia's chief rival in the Balkan region (despite being an ally of the Russians and the Germans in the League of the Three Emperors). Hence, in 1878, Bismarck called an international conference (the Congress of Berlin) in order to sort out the problem. The Treaty of Berlin that resulted from the conference reversed Russia's gains from the Treaty of San Stefano and provided the Austrians with compensation in the form of Bosnia. Despite Bismarck's attempts to play the role of an "honest broker" at the Congress of Berlin, Russo-German relations deteriorated following the conference. The Three Emperors' League was discontinued, and Germany and Austria-Hungary were free to ally with one another against Russia. 
Italy, new ally
In 1881, Italy lost in the competition with France to establish a colony in Tunis (present-day Tunisia). To enlist diplomatic support, Italy joined Germany and Austria-Hungary to form the Triple Alliance in 1882, which was the first formal war-camp in Europe, the second being the Triple Entente, an informal alliance, formed in 1907.
During World War I, however, Italy did not go to war immediately with its allies but stayed neutral. In 1915, it joined the Entente powers and declared war on Austria-Hungary, and later Germany in the subsequent year. The Dual Alliance persisted throughout the war, known as the Central Powers, and ended with their defeat in 1918.
- Rene Albrecht Carrie, A Diplomatic History of Europe Since the Congress of Vienna (1958) pp 177–79.
- Roland G. Usher, "Austro-German Relations Since 1866." American Historical Review 23.3 (1918): 577-595 online.
- Christopher Andrew, "German world policy and the reshaping of the dual alliance." Journal of Contemporary History 1.3 (1966): 137-151 online.
- Martel, Gordon. The Origins of the First World War. Third edition, 2003, p. 21.
- Buce Waller, "Bismarck, the Dual Alliance and Economic Central Europe, 1877-1885." VSWG: Vierteljahrschrift für Sozial-und Wirtschaftsgeschichte 63#4 (1976): 454-467 online in English.
- "Austro-German Alliance". Encyclopædia Britannica. Encyclopædia Britannica Online. Encyclopædia Britannica Inc., 2016. Web. 10 Feb. 2016<http://www.britannica.com/event/Austro-German-Alliance>.