The Triple Alliance between Germany, Austria-Hungary and Italy was formed to protect the member nations by promising military support in the event of attack by other great powers. Initiated by Otto von Bismarck, it was first formed in 1882 and periodically renewed until the outbreak of World War I in 1914.
In 1879, Germany and Austria-Hungary, already bound by ethnic ties, formed an alliance, mainly to defend themselves against Russia. In 1881, the French occupied Tunisia, which the Italians also coveted. This prompted Italy to join the alliance in 1882 to protect itself against France, which the other members of the alliance already considered a threat. Under the terms of the agreement, if either Germany or Italy were attacked by France, the other members would come to their aid, and if Germany or Austria-Hungary were attacked by Russia, Italy remained neutral. Despite the mutual accord, the countries continued to squabble over Italy's North African colonial ambitions and Austria-Hungary's territorial desires in the Balkans.
In 1902, unsure of the integrity of the other members of the alliance, Italy made a secret agreement with France that if Germany or Austria-Hungary attacked either country, the other would remain neutral. This effectively ended the Triple Alliance, though Italy ostensibly continued to renew the agreement, first in 1907 and again in 1912. In 1914, confident of German support, Austria-Hungary attacked Serbia and began World War I. In 1915, after extended secret negotiations, Italy entered the First World War on the side of the Allies, the alliance of nations opposing Germany and Austria-Hungary.