Germany, Austria-Hungary and Italy formed the Triple Alliance.
Germany and Austria-Hungary had formed the defensive Dual Alliance in 1879 in which both countries agreed to assist each other if they were attacked by Russia and promised benevolent neutrality to the other in case of war with another nation.
Two years later Italy, which had North African imperial ambitions, was frustrated by France’s seizure of Tunisia. Wishing to secure a foreign alliance in case of future aggression from France, Italy consequently turned to Germany and Austria-Hungary, expanding their established relationship to form the Triple Alliance in 1882.
The alliance provided Italy with German and Austro-Hungarian assistance in case France chose to attack, in return for which Italy would assist Germany if they were attacked. Meanwhile Austria-Hungary benefited from a guarantee that Italy would remain neutral in case of a war with Russia, removing the risk of a war on two fronts and providing some security amidst the rising tensions in the Balkans.
The alliance was renewed in 1887, 1907 and 1912. Meanwhile, in October 1883, Romania had secretly joined the Triple Alliance. This move was so secret that only King Carol I and a few senior politicians even knew.
However, similar to Italy’s involvement in the agreement, this did not result in Romania joining the Central Powers when war broke out in 1914. Having based their decision on the fact that the first country to take offensive action was Austria-Hungary when it attacked Serbia, both Italy and Romania initially opted for neutrality. They claimed that, since the Triple Alliance was defensive, they were not duty bound to support the aggressor.