Question: why did italy fight against germany when the two countries had signed an alliance

title: Triple Alliance (1882)
text: The Triple Alliance was a secret agreement between Germany , Austria - Hungary , and Italy . It was formed on 20 May 1882 and renewed periodically until it expired in 1915 during World War I. Germany and Austria - Hungary had been closely allied since 1879 . Italy sought support against France shortly after it lost North African ambitions to the French . Each member promised mutual support in the event of an attack by any other great power . The treaty provided that Germany and Austria - Hungary were to assist Italy if it was attacked by France without provocation . In turn , Italy would assist Germany if attacked by France . In the event of a war between Austria - Hungary and Russia , Italy promised to remain neutral .