Dual Alliance (1879)
The Dual Alliance was a defensive alliance between Germany and Austria-Hungary, which was created by treaty on 7 October 1879 as part of 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). Germany’s Otto von 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, who was Russia's chief competitor for influence 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.